AI_AND_ML_MODEL_VISUALIZER / samples /sample_plot3d.py
Jack-ki1's picture
Upload 31 files
f62a6a7 verified
Raw
History Blame Contribute Delete
441 Bytes
"""Sample: a matplotlib 3D surface plot (no model — pure visualization code)."""
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
x = np.linspace(-5, 5, 100)
y = np.linspace(-5, 5, 100)
X, Y = np.meshgrid(x, y)
Z = np.sin(np.sqrt(X ** 2 + Y ** 2))
fig = plt.figure()
ax = fig.add_subplot(projection="3d")
ax.plot_surface(X, Y, Z, cmap="viridis")
ax.set_title("Damped ripple surface")
plt.show()