【Python】FFmpeg

源码:
for add in np.arange(15):
ims.append((plt.pcolor(x, y, base + add, norm=plt.Normalize(0, 30)),))

问题:
D:/Study/python program study/matplotlibs/basic_example_writer.py:47: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3. Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading']. This will become an error two minor releases later.
ims.append((plt.pcolor(x, y, base + add, norm=plt.Normalize(0, 30)),))

问题描述:

MatplotlibDeprecationWarning:当X和Y的维度与C相同时,shading='flat'从3.3开始就不推荐使用。使用X和Y指定四边形的角点,或传递shading='auto'、'nearest'或'gouraud',或设置rcParams['pcolor.着色']. 这在以后将成为一个错误的两个小版本。

解决办法:修改pcolormesh函数

plt.pcolormesh(xx, yy, z.reshape(xx.shape), shading='auto', cmap=cmap_light)

全部评论

相关推荐

03-28 16:43
佛山大学 Java
java全国可飞:简历2.0,各位佬看看,这样可以吗查看图片
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务