quadmesh_demo.py
来自「非原创。很好的python例子」· Python 代码 · 共 18 行
PY
18 行
from matplotlib.mlab import linspace, meshgridimport matplotlib.numerix as nxfrom pylab import figure,shown = 56x = linspace(-1.5,1.5,n)X,Y = meshgrid(x,x);Qx = nx.cos(Y) - nx.cos(X)Qz = nx.sin(Y) + nx.sin(X)Qx = (Qx + 1.1)Z = nx.sqrt(X**2 + Y**2)/5;Z = (Z - nx.mlab.amin(Z)) / (nx.mlab.amax(Z) - nx.mlab.amin(Z))fig = figure()ax = fig.add_subplot(111)ax.pcolormesh(Qx,Qz,Z)show()
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?