Supporting Libraries / Dependencies
To work with matplotlib, verify that the Python environment has the supporting libraries installed either via pip or through the Anaconda distribution, which should install them as part of the matplotlib package automatically.
Required Libraries:
- cycler
- freetype
- kiwisolver
- libtiff
- lz4-c
- matplotlib-base
- olefile
- pillow
- tk
- xz
- zstd
Extensions
Basemap
Matplotlib has a basemap extension that can be used for static geographical plotting, though plotly is better suited with its interactive opportunities with geographical plotting.
Basemap Matplotlib Toolkit
matplotlib.org
Functionality
Magic Functions
The following magic function is used to interact with Matplotlib plots within an IPython-supported notebook, such as the Jupyter kernel (Python shell), which uses IPython as its backend. Basically, it displays plots 'inline' within the notebook.
%mtaplotlib inlineSource: https://ipython.readthedocs.io/en/stable/interactive/tutorial.html#magics-explained
In other cases, the following would be called to display a plot
plt.show()References
Plot Look Dev
Legend Location Codes: https://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend
Named Color Codes: https://matplotlib.org/3.3.3/gallery/color/named_colors.html
Line Style Reference: https://matplotlib.org/gallery/lines_bars_and_markers/line_styles_reference.html
Marker Symbol Codes: https://matplotlib.org/api/markers_api.html
Quick Reference
rougier/matplotlib-tutorial
Sources are available from github All code and material is licensed under a Creative Commons Attribution-ShareAlike 4.0. You can test your installation before the tutorial using the check-installation.py script. See also: matplotlib is probably the single most used Python package for 2D-graphics.
github.com
Documentation
The gallery (Example) section of the website includes many examples of graphs and relevant code to generate them.
Gallery - Matplotlib 3.3.3 documentation
This gallery contains examples of the many things you can do with Matplotlib. Click on any image to see the full image and source code. For longer tutorials, see our tutorials page. You can also find external resources and a FAQ in our user guide.
matplotlib.org