pcolor_demo.py
字号:
#!/usr/bin/env python"""See pcolor_demo2 for an alternative way of generating pcolor plotsusing imshow that is likely faster for large grids"""from __future__ import divisionfrom matplotlib.patches import Patchfrom pylab import *def func3(x,y): return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)# make these smaller to increase the resolutiondx, dy = 0.05, 0.05x = arange(-3.0, 3.0001, dx)y = arange(-3.0, 3.0001, dy)X,Y = meshgrid(x, y)Z = func3(X, Y)pcolor(X, Y, Z, shading='flat')colorbar()axis([-3,3,-3,3])savefig('pcolor_demo')show()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -