简介
本教程将指导你使用 Python 中的 Matplotlib 创建三维等高线图的过程。等高线图使用等高线或等值线来表示三维表面。我们将使用 contour()
函数来创建这些等值线,并使用 extend3d=True
选项将曲线垂直扩展为“带状”。
虚拟机使用提示
虚拟机启动完成后,点击左上角切换到笔记本标签页,以访问 Jupyter Notebook 进行练习。
有时,你可能需要等待几秒钟让 Jupyter Notebook 完成加载。由于 Jupyter Notebook 的限制,操作验证无法自动化。
如果你在学习过程中遇到问题,请随时向 Labby 提问。课程结束后提供反馈,我们将立即为你解决问题。
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
matplotlib(("Matplotlib")) -.-> matplotlib/BasicConceptsGroup(["Basic Concepts"])
python(("Python")) -.-> python/BasicConceptsGroup(["Basic Concepts"])
python(("Python")) -.-> python/DataStructuresGroup(["Data Structures"])
python(("Python")) -.-> python/ModulesandPackagesGroup(["Modules and Packages"])
matplotlib(("Matplotlib")) -.-> matplotlib/SpecializedPlotsGroup(["Specialized Plots"])
python(("Python")) -.-> python/DataScienceandMachineLearningGroup(["Data Science and Machine Learning"])
matplotlib/BasicConceptsGroup -.-> matplotlib/importing_matplotlib("Importing Matplotlib")
matplotlib/BasicConceptsGroup -.-> matplotlib/figures_axes("Understanding Figures and Axes")
python/BasicConceptsGroup -.-> python/booleans("Booleans")
python/DataStructuresGroup -.-> python/tuples("Tuples")
python/ModulesandPackagesGroup -.-> python/importing_modules("Importing Modules")
python/ModulesandPackagesGroup -.-> python/using_packages("Using Packages")
matplotlib/SpecializedPlotsGroup -.-> matplotlib/contour_plots("Contour Plots")
python/DataScienceandMachineLearningGroup -.-> python/data_visualization("Data Visualization")
subgraph Lab Skills
matplotlib/importing_matplotlib -.-> lab-48623{{"使用 Matplotlib 进行三维等高线绘图"}}
matplotlib/figures_axes -.-> lab-48623{{"使用 Matplotlib 进行三维等高线绘图"}}
python/booleans -.-> lab-48623{{"使用 Matplotlib 进行三维等高线绘图"}}
python/tuples -.-> lab-48623{{"使用 Matplotlib 进行三维等高线绘图"}}
python/importing_modules -.-> lab-48623{{"使用 Matplotlib 进行三维等高线绘图"}}
python/using_packages -.-> lab-48623{{"使用 Matplotlib 进行三维等高线绘图"}}
matplotlib/contour_plots -.-> lab-48623{{"使用 Matplotlib 进行三维等高线绘图"}}
python/data_visualization -.-> lab-48623{{"使用 Matplotlib 进行三维等高线绘图"}}
end