简介
在数据可视化中,为了在不同图表之间进行有意义的比较,保持坐标轴大小一致非常重要。Matplotlib 库提供了一种方法来为大小不变的图形创建固定大小的坐标轴。在本实验中,我们将学习如何使用 Matplotlib 创建固定大小的坐标轴。
虚拟机使用提示
虚拟机启动完成后,点击左上角切换到“笔记本”标签页,以访问 Jupyter Notebook 进行练习。
有时,你可能需要等待几秒钟让 Jupyter Notebook 完成加载。由于 Jupyter Notebook 的限制,操作验证无法自动化。
如果你在学习过程中遇到问题,随时向 Labby 提问。课程结束后提供反馈,我们会及时为你解决问题。
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
matplotlib(("Matplotlib")) -.-> matplotlib/PlottingDataGroup(["Plotting Data"])
python(("Python")) -.-> python/DataStructuresGroup(["Data Structures"])
python(("Python")) -.-> python/ModulesandPackagesGroup(["Modules and Packages"])
matplotlib(("Matplotlib")) -.-> matplotlib/BasicConceptsGroup(["Basic Concepts"])
python(("Python")) -.-> python/BasicConceptsGroup(["Basic Concepts"])
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")
matplotlib/PlottingDataGroup -.-> matplotlib/line_plots("Line Plots")
python/DataStructuresGroup -.-> python/lists("Lists")
python/DataStructuresGroup -.-> python/tuples("Tuples")
python/ModulesandPackagesGroup -.-> python/importing_modules("Importing Modules")
python/ModulesandPackagesGroup -.-> python/using_packages("Using Packages")
python/DataScienceandMachineLearningGroup -.-> python/data_visualization("Data Visualization")
subgraph Lab Skills
matplotlib/importing_matplotlib -.-> lab-48675{{"Matplotlib 固定大小坐标轴"}}
matplotlib/figures_axes -.-> lab-48675{{"Matplotlib 固定大小坐标轴"}}
python/booleans -.-> lab-48675{{"Matplotlib 固定大小坐标轴"}}
matplotlib/line_plots -.-> lab-48675{{"Matplotlib 固定大小坐标轴"}}
python/lists -.-> lab-48675{{"Matplotlib 固定大小坐标轴"}}
python/tuples -.-> lab-48675{{"Matplotlib 固定大小坐标轴"}}
python/importing_modules -.-> lab-48675{{"Matplotlib 固定大小坐标轴"}}
python/using_packages -.-> lab-48675{{"Matplotlib 固定大小坐标轴"}}
python/data_visualization -.-> lab-48675{{"Matplotlib 固定大小坐标轴"}}
end