In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
In [2]:
nx, ny = (3, 6)
x = np.linspace(0, 1, nx)
y = np.linspace(0, 1, ny)
xv, yv, = np.meshgrid(x, y)
xv
Out[2]:
In [5]:
x = np.arange(-5, 2, 1)
y = np.arange(-5, 5, 0.1)
xx, yy = np.meshgrid(x, y, sparse=True)
z = np.sin(xx**2 + yy**2) / (xx**2 + yy**2)
h = plt.contour(x,y,z)
xx
Out[5]:
In [ ]: