Introduction
Matplotlib is a plotting library for the Python programming language. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK. Matplotlib allows developers to create a wide range of static, animated, and interactive visualizations in Python.
In this lab, we will learn how to create custom units in Matplotlib and plot data using these custom units.
VM Tips
After the VM startup is done, click the top left corner to switch to the Notebook tab to access Jupyter Notebook for practice.
Sometimes, you may need to wait a few seconds for Jupyter Notebook to finish loading. The validation of operations cannot be automated because of limitations in Jupyter Notebook.
If you face issues during learning, feel free to ask Labby. Provide feedback after the session, and we will promptly resolve the problem for you.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
python(("`Python`")) -.-> python/BasicConceptsGroup(["`Basic Concepts`"])
matplotlib(("`Matplotlib`")) -.-> matplotlib/BasicConceptsGroup(["`Basic Concepts`"])
matplotlib(("`Matplotlib`")) -.-> matplotlib/PlottingDataGroup(["`Plotting Data`"])
matplotlib(("`Matplotlib`")) -.-> matplotlib/PlotCustomizationGroup(["`Plot Customization`"])
python(("`Python`")) -.-> python/ControlFlowGroup(["`Control Flow`"])
python(("`Python`")) -.-> python/DataStructuresGroup(["`Data Structures`"])
python(("`Python`")) -.-> python/FunctionsGroup(["`Functions`"])
python(("`Python`")) -.-> python/ModulesandPackagesGroup(["`Modules and Packages`"])
python(("`Python`")) -.-> python/ObjectOrientedProgrammingGroup(["`Object-Oriented Programming`"])
python(("`Python`")) -.-> python/DataScienceandMachineLearningGroup(["`Data Science and Machine Learning`"])
python/BasicConceptsGroup -.-> python/comments("`Comments`")
matplotlib/BasicConceptsGroup -.-> matplotlib/importing_matplotlib("`Importing Matplotlib`")
matplotlib/BasicConceptsGroup -.-> matplotlib/figures_axes("`Understanding Figures and Axes`")
matplotlib/PlottingDataGroup -.-> matplotlib/line_plots("`Line Plots`")
matplotlib/PlotCustomizationGroup -.-> matplotlib/line_styles_colors("`Customizing Line Styles and Colors`")
python/ControlFlowGroup -.-> python/conditional_statements("`Conditional Statements`")
python/ControlFlowGroup -.-> python/for_loops("`For Loops`")
python/ControlFlowGroup -.-> python/list_comprehensions("`List Comprehensions`")
python/DataStructuresGroup -.-> python/lists("`Lists`")
python/DataStructuresGroup -.-> python/tuples("`Tuples`")
python/FunctionsGroup -.-> python/function_definition("`Function Definition`")
python/FunctionsGroup -.-> python/default_arguments("`Default Arguments`")
python/ModulesandPackagesGroup -.-> python/importing_modules("`Importing Modules`")
python/ObjectOrientedProgrammingGroup -.-> python/classes_objects("`Classes and Objects`")
python/ObjectOrientedProgrammingGroup -.-> python/constructor("`Constructor`")
python/ObjectOrientedProgrammingGroup -.-> python/polymorphism("`Polymorphism`")
python/ObjectOrientedProgrammingGroup -.-> python/encapsulation("`Encapsulation`")
python/DataScienceandMachineLearningGroup -.-> python/numerical_computing("`Numerical Computing`")
python/DataScienceandMachineLearningGroup -.-> python/data_visualization("`Data Visualization`")
python/FunctionsGroup -.-> python/build_in_functions("`Build-in Functions`")
subgraph Lab Skills
python/comments -.-> lab-48719{{"`Matplotlib Custom Units`"}}
matplotlib/importing_matplotlib -.-> lab-48719{{"`Matplotlib Custom Units`"}}
matplotlib/figures_axes -.-> lab-48719{{"`Matplotlib Custom Units`"}}
matplotlib/line_plots -.-> lab-48719{{"`Matplotlib Custom Units`"}}
matplotlib/line_styles_colors -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/conditional_statements -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/for_loops -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/list_comprehensions -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/lists -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/tuples -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/function_definition -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/default_arguments -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/importing_modules -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/classes_objects -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/constructor -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/polymorphism -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/encapsulation -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/numerical_computing -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/data_visualization -.-> lab-48719{{"`Matplotlib Custom Units`"}}
python/build_in_functions -.-> lab-48719{{"`Matplotlib Custom Units`"}}
end