Introduction
This lab will guide you through the process of customizing .rcParams
on the fly using Python Matplotlib. You will learn how to define functions in a custom module that set the defaults for figures, and how to use these defaults to create different sets of defaults for figures, such as one set for publication and another set for interactive exploration.
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/AdvancedPlottingGroup(["`Advanced Plotting`"])
matplotlib(("`Matplotlib`")) -.-> matplotlib/PlotCustomizationGroup(["`Plot Customization`"])
matplotlib(("`Matplotlib`")) -.-> matplotlib/AdvancedTopicsGroup(["`Advanced Topics`"])
python(("`Python`")) -.-> python/DataStructuresGroup(["`Data Structures`"])
python(("`Python`")) -.-> python/FunctionsGroup(["`Functions`"])
python(("`Python`")) -.-> python/ModulesandPackagesGroup(["`Modules and Packages`"])
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/AdvancedPlottingGroup -.-> matplotlib/subplots("`Subplots`")
matplotlib/PlotCustomizationGroup -.-> matplotlib/line_styles_colors("`Customizing Line Styles and Colors`")
matplotlib/PlotCustomizationGroup -.-> matplotlib/grid_config("`Grid Configuration`")
matplotlib/AdvancedTopicsGroup -.-> matplotlib/matplotlib_config("`Customizing Matplotlib Configurations`")
python/BasicConceptsGroup -.-> python/booleans("`Booleans`")
python/DataStructuresGroup -.-> python/lists("`Lists`")
python/DataStructuresGroup -.-> python/tuples("`Tuples`")
python/DataStructuresGroup -.-> python/dictionaries("`Dictionaries`")
python/FunctionsGroup -.-> python/function_definition("`Function Definition`")
python/ModulesandPackagesGroup -.-> python/importing_modules("`Importing Modules`")
python/DataScienceandMachineLearningGroup -.-> python/data_visualization("`Data Visualization`")
subgraph Lab Skills
python/comments -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
matplotlib/importing_matplotlib -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
matplotlib/figures_axes -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
matplotlib/line_plots -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
matplotlib/subplots -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
matplotlib/line_styles_colors -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
matplotlib/grid_config -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
matplotlib/matplotlib_config -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
python/booleans -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
python/lists -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
python/tuples -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
python/dictionaries -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
python/function_definition -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
python/importing_modules -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
python/data_visualization -.-> lab-48646{{"`Customizing Matplotlib Defaults with Python`"}}
end