"""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()