如果画图时出现以下报错:
Matplotlib Deprecation Warning:
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.
解决方法:
源语句:
p1 = plt.pcolormesh(x,y,f,cmap='jet')
修正后:
p1 = plt.pcolormesh(x,y,f,shading='auto',cmap='jet')