3
matplotlibを使用したときに次のエラーが発生しました。私はこの警告メッセージを修正することを知りたいです。私はplt.contourf()
にaxis = 0
を渡そうとしましたが、助けになりません。matplotlibの使用中に "MaskedArrayFutureWarning"を修正するには?
警告:
C:\Users\user\Anaconda3\lib\site-packages\numpy\ma\core.py:6385: MaskedArrayFutureWarning: In the future the default for ma.minimum.reduce will be axis=0, not the current None, to match np.minimum.reduce. Explicitly pass 0 or None to silence this warning.
return self.reduce(a)
コード:
figT = plt.figure(figsize=(20,15)) # (width, height)
for i in range(n_cases):
ax = plt.subplot(3, 3, i+1)
plt.contourf(x, y, sess.run(T[:,:,i]), colorInterpolation, cmap=colorMap)
plt.colorbar().ax.set_ylabel('Temperature ($^\circ$C)', fontsize = set_fontSize)
plt.xlabel('X Position', fontsize = set_fontSize)
plt.ylabel('Y Position', fontsize = set_fontSize)
plt.title("Case %d" % (i+1), fontsize = set_fontSize)
figT.savefig(dirFig+'T_results.png', format='png', dpi=set_dpi, bbox_inches='tight')
修正方法を教えてください。私は 'plt.contourf(axis = 0)'を試みましたが、警告はまだそこにあります。 – world2005
警告を投げるコードは間接的に呼び出され、libにあるようです。すべてのライブラリが最新のものであることを確認してください。 –