- 130 名前:デフォルトの名無しさん [2011/06/28(火) 17:44:57.28 .net]
- ttp://matplotlib.sourceforge.net/users/image_tutorial.html
の例(をsubplotsを使って書き直そうとしたもの)なんですが、カラーバーの位置がおかしいです。 どうしてax[0].figureで欲しいものが取れないのでしょうか? ========================= import matplotlib.pyplot as plt import matplotlib.image as mpimg img = mpimg.imread('stinkbug.png') fig,ax = plt.subplots(ncols=2) ax[0].set_aspect(1) img1 = ax[0].imshow(img[:,:,0]) ax[0].figure.colorbar(img1,orientation ='horizontal') plt.show()
|

|