SORU
12 NİSAN 2009, Pazar


Nasıl bir komplo ile işim bitti. matplotlib söylerim?

İki PostScript aşağıdaki kod araziler (.ps) dosyaları, ama ikinci bir satır içerir.

import matplotlib
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab

plt.subplot(111)
x = [1,10]
y = [30, 1000]
plt.loglog(x, y, basex=10, basey=10, ls="-")
plt.savefig("first.ps")


plt.subplot(111)
x = [10,100]
y = [10, 10000]
plt.loglog(x, y, basex=10, basey=10, ls="-")
plt.savefig("second.ps")

Nasıl ikinci arsa için yeniden başlamak için matplotlib söyleyebilir miyim?

CEVAP
12 NİSAN 2009, Pazar


Net rakam bir komut var, ve sizin için bunu yapmak gerekir:

plt.clf()

Aynı şekilde birden fazla subplots varsa

plt.cla()

temizler geçerli baltalar.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • hidetake takayama

    hidetake tak

    3 Mart 2009
  • kremosakhaz

    kremosakhaz

    25 AĞUSTOS 2006
  • Theodore Leaf

    Theodore Lea

    29 AĞUSTOS 2006