diff options
Diffstat (limited to 'doc/source/user/plots/matplotlib3.py')
| -rw-r--r-- | doc/source/user/plots/matplotlib3.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/source/user/plots/matplotlib3.py b/doc/source/user/plots/matplotlib3.py new file mode 100644 index 000000000..af778979b --- /dev/null +++ b/doc/source/user/plots/matplotlib3.py @@ -0,0 +1,16 @@ +import numpy as np +import matplotlib.pyplot as plt +from matplotlib import cm +from mpl_toolkits.mplot3d import Axes3D + +fig = plt.figure() +ax = Axes3D(fig) +X = np.arange(-5, 5, 0.15) +Y = np.arange(-5, 5, 0.15) +X, Y = np.meshgrid(X, Y) +R = np.sqrt(X**2 + Y**2) +Z = np.sin(R) + +ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap='viridis') + +plt.show()
\ No newline at end of file |
