编程语言
首页 > 编程语言> > 2维C网格在Python中直观展示

2维C网格在Python中直观展示

作者:互联网

 

Chebyshev grid
1 import numpy as np
2 import matplotlib.pyplot as plt
3 N = 30
4 M = 15
5 x = np.cos (np.pi * np.arange(N + 1) / N)
6 y = np.cos (np.pi * np.arange(M + 1) / M)
7 xx, yy = np.meshgrid(x, y)
8 plt.plot(xx, yy, "ko", markersize = 3)
9 plt.show()

代码来源:

interpolation - chebyshev nodes on a 2D grid - Mathematics Stack Exchange

标签:plt,Python,网格,yy,xx,np,import,pi,直观
来源: https://www.cnblogs.com/physical-oceanography/p/15533721.html