Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.cm as cm
- import matplotlib.pyplot as plt
- import matplotlib.cbook as cbook
- from matplotlib.path import Path
- from matplotlib.patches import PathPatch
- delta = 0.02
- x = y = np.arange(-3.0, 3.0, delta)
- X, Y = np.meshgrid(x, y)
- # Z1 = np.cos(X)
- # Z2 = np.sin(Y)
- # Z = (Z1 - Z2) * 2
- Z = np.cos(X)*np.sin(Y)
- fig, ax = plt.subplots()
- im = ax.imshow(Z, interpolation='nearest',
- origin='lower', extent=[-3, 3, -3, 3],
- vmax=abs(Z).max(), vmin=-abs(Z).max())
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement