简介
Matplotlib 是一个用于 Python 编程语言及其数值数学扩展 NumPy 的绘图库。它提供了一个面向对象的 API,用于使用 Tkinter、wxPython、Qt 或 GTK 等通用 GUI 工具包将绘图嵌入应用程序中。它还为非交互式绘图提供了一个过程式接口。
在这个实验中,你将学习如何使用 Matplotlib 创建一个简单的绘图。
虚拟机使用提示
虚拟机启动完成后,点击左上角切换到“笔记本”标签,以访问 Jupyter Notebook 进行练习。
有时,你可能需要等待几秒钟让 Jupyter Notebook 完成加载。由于 Jupyter Notebook 的限制,操作验证无法自动化。
如果你在学习过程中遇到问题,随时向 Labby 提问。课程结束后提供反馈,我们会及时为你解决问题。
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
python(("Python")) -.-> python/ModulesandPackagesGroup(["Modules and Packages"])
python(("Python")) -.-> python/DataScienceandMachineLearningGroup(["Data Science and Machine Learning"])
matplotlib(("Matplotlib")) -.-> matplotlib/BasicConceptsGroup(["Basic Concepts"])
matplotlib(("Matplotlib")) -.-> matplotlib/PlottingDataGroup(["Plotting Data"])
python(("Python")) -.-> python/DataStructuresGroup(["Data Structures"])
matplotlib(("Matplotlib")) -.-> matplotlib/PlotCustomizationGroup(["Plot Customization"])
matplotlib/BasicConceptsGroup -.-> matplotlib/importing_matplotlib("Importing Matplotlib")
matplotlib/BasicConceptsGroup -.-> matplotlib/figures_axes("Understanding Figures and Axes")
matplotlib/BasicConceptsGroup -.-> matplotlib/saving_figures("Saving Figures to File")
matplotlib/PlottingDataGroup -.-> matplotlib/line_plots("Line Plots")
python/DataStructuresGroup -.-> python/lists("Lists")
python/DataStructuresGroup -.-> python/tuples("Tuples")
matplotlib/PlotCustomizationGroup -.-> matplotlib/titles_labels("Adding Titles and Labels")
python/ModulesandPackagesGroup -.-> python/importing_modules("Importing Modules")
python/DataScienceandMachineLearningGroup -.-> python/data_visualization("Data Visualization")
subgraph Lab Skills
matplotlib/importing_matplotlib -.-> lab-48887{{"面向 Python 初学者的 Matplotlib 绘图"}}
matplotlib/figures_axes -.-> lab-48887{{"面向 Python 初学者的 Matplotlib 绘图"}}
matplotlib/saving_figures -.-> lab-48887{{"面向 Python 初学者的 Matplotlib 绘图"}}
matplotlib/line_plots -.-> lab-48887{{"面向 Python 初学者的 Matplotlib 绘图"}}
python/lists -.-> lab-48887{{"面向 Python 初学者的 Matplotlib 绘图"}}
python/tuples -.-> lab-48887{{"面向 Python 初学者的 Matplotlib 绘图"}}
matplotlib/titles_labels -.-> lab-48887{{"面向 Python 初学者的 Matplotlib 绘图"}}
python/importing_modules -.-> lab-48887{{"面向 Python 初学者的 Matplotlib 绘图"}}
python/data_visualization -.-> lab-48887{{"面向 Python 初学者的 Matplotlib 绘图"}}
end