Python 注释后Matplotlib绘图是否消失?
注释后,绘图消失。保存后唯一剩下的就是注释。有人能给我一个建议,在注释后如何保存。如果不发布示例数据,我无法测试这个。我的怀疑是,将数据向量乘以1e6会使其不可见。您能否发布前几行Python 注释后Matplotlib绘图是否消失?,python,matplotlib,Python,Matplotlib,注释后,绘图消失。保存后唯一剩下的就是注释。有人能给我一个建议,在注释后如何保存。如果不发布示例数据,我无法测试这个。我的怀疑是,将数据向量乘以1e6会使其不可见。您能否发布前几行数据,以便我们重现您的问题? fig1 = figure() ax = fig1.add_subplot(111, autoscale_on = False) ax.plot(data[:,0]*1E6, data[:,3] ,data[:,0]*1E6, data[:,4],'r')
数据
,以便我们重现您的问题?
fig1 = figure()
ax = fig1.add_subplot(111, autoscale_on = False)
ax.plot(data[:,0]*1E6, data[:,3]
,data[:,0]*1E6, data[:,4],'r')
plt.xlabel('Time (us)')
plt.ylabel('Voltage (V)')
plt.title('Time')
plt.grid()
ax.annotate('axes center', xy=(.5, .5), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.gca().xaxis.set_major_locator(MaxNLocator(prune='lower'))
plt.savefig('Time.png',orientation='landscape', pad_inches=0.1)
plt.clf()