1
我想產生一個日誌(基地2)陰謀,但我一直得到一個沒有頂部/底部邊界的情節。Matplotlib日誌規模與限制關閉底部/向上繪圖脊柱
import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter
def toK (array):
return map (lambda x: x/1000.0, array)
yy = [2603.76, 41077.89,48961.74, 43471.14]
xx = [1,16,32,64]
ax = plt.subplot(221, axisbg = 'white')
ax.set_xlim(0, 128)
ax.set_xscale('log', basex=2)
ax.plot(xx, toK(yy), label="0%", linestyle='--', marker='o', clip_on = False)
plt.savefig('./tx2.pdf', bbox_inches='tight')
我怎麼能這樣做是否正確?
我試過symlog之前但在保存繪圖時失敗。 – fabiim
@fabiim - 它如何失敗?你能提供更多的細節嗎? –
http://pastebin.com/bqjZUDDe(我用plt.savefig('./ tx2.png'))而不是show – fabiim