我正在尝试保存使用matplotlib创建的图;但是,图像保存为空白。这是我的代码:plt.subplot(121)plt.imshow(dataStack, cmap=mpl.cm.bone)plt.subplot(122)y = copy.deepcopy(tumorStack)y = np.ma.masked_where(y == 0, y)plt.imshow(dataStack, cmap=mpl.cm.bone)plt.imshow(y, cmap=mpl.cm.jet_r, interpolation='nearest')if T0 is not None: plt.subplot(123) plt.imshow(T0, cmap=mpl.cm.bone) #plt.subplot(124) #Autozoom#else: #plt.subplot(124) #Autozoomplt.show()plt.draw()plt.savefig('tessstttyyy.png', dpi=100)tessstttyyy.png为空白(也尝试使用.jpg)
添加回答
举报
0/150
提交
取消