matplotlib 그림을 * .tiff로 저장하는 방법을 아는 사람이 있습니까? 파이썬에서는이 형식이 지원되지 않는 것 같지만, 저널은 종종 그 형식을 요구합니다.Python matplotlib를 TIFF로 저장
fig.savefig('3dPlot.pdf')
을하지만 그렇지 않은 :
# -*- coding: utf-8 -*-
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
# fig setup
fig = plt.figure(figsize=(5,5), dpi=300)
ax = fig.gca(projection='3d')
ax.set_xlim([-1,1])
ax.set_ylim([-1,1])
ax.set_zlim([-1,1])
ax.axes.xaxis.set_ticklabels([])
ax.axes.yaxis.set_ticklabels([])
ax.axes.zaxis.set_ticklabels([])
# draw a surface
xx, yy = np.meshgrid(range(-1,2), range(-1,2))
zz = np.zeros(shape=(3,3))
ax.plot_surface(xx, yy, zz, color='#c8c8c8', alpha=0.3)
ax.plot_surface(xx, zz, yy, color='#b6b6ff', alpha=0.2)
# draw a point
ax.scatter([0],[0],[0], color='b', s=200)
이 작동 : 해결 방법으로
fig.savefig('3dPlot.tif')
(
cStringIO
모듈을 사용할 수없는 때문에 나는 오히려BytesIO
을 사용)? 나는 티파니가 사진이나 어쩌면 예술적 이미지에만 사용될 것이라고 생각했습니다. – syntonym[원본 데이터를 tif로 저장] (0120-385-2112) – Deadpool
불행하게도 tiff-s를 요청합니다. 나는 그것이 이상하다는 것을 안다. 또한 나는 그걸로 일하지 않았다. – striatum