{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# plot_surface(X, Y, Z)\n\nSee `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface`.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\nimport numpy as np\n\nfrom matplotlib import cm\n\nplt.style.use('_mpl-gallery')\n\n# Make data\nX = np.arange(-5, 5, 0.25)\nY = np.arange(-5, 5, 0.25)\nX, Y = np.meshgrid(X, Y)\nR = np.sqrt(X**2 + Y**2)\nZ = np.sin(R)\n\n# Plot the surface\nfig, ax = plt.subplots(subplot_kw={\"projection\": \"3d\"})\nax.plot_surface(X, Y, Z, vmin=Z.min() * 2, cmap=cm.Blues)\n\nax.set(xticklabels=[],\n yticklabels=[],\n zticklabels=[])\n\nplt.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.5" } }, "nbformat": 4, "nbformat_minor": 0 }