Python plotting libraries

Contents

Python plotting libraries

Figure 4.1. Plotting libraries available in Python. Interactive version online at https://pyviz.org/overviews/index.html.

Figure 4.1. Plotting libraries available in Python. Interactive version online at https://pyviz.org/overviews/index.html.

Python has many nice, useful libraries that can be used for plotting. In the figure above, you can see a number of the available plotting library options, along with how they relate to one another. Of the options above we would like to highlight the following:

  • Matplotlib 1: Matplotlib is one of the most widely used Python plotting libraries, sometimes referred to as “the grand old man of Python plotting”. Plot examples can be found in the Matplotlib gallery.

  • Bokeh 4: Bokeh is a modern plotting library for static and interactive web-based plots including graphs, maps, and charts. Examples can be found in the Bokeh gallery.

  • Plotly 5: Similar in some ways to Bokeh, Plotly is a modern plotting library for static and interactive web-based plots. Some features are commercial. Example plots are available in the Plotly gallery.

  • Dash 6: Dash is a Python framework for building analytical web applications. No JavaScript required.

  • ggplot 7: ggplot is a Python plotting environment for those familiar with creating plots in R using ggplot2. You can use ggplot in Python too! Plot examples can be found in the ggplot examples.

  • HoloViews 8: and GeoViews 9: HoloViews and GeoViews aim to let the data visualize itself. Learn more in the HoloViews introductory video at https://www.youtube.com/watch?v=hNsR2H7Lrg0.

    • Both are modern and powerful visualization libraries built on top of Matplotlib and Bokeh that make exploring and visualizing your data quicker than ever before.

    • HoloViews is designed for basic plotting. More information available in the HoloViews tutorial and the HoloViews example plots.

    • GeoViews is designed for creating nice and interactive maps. Examples can be found in the GeoViews gallery.

You should explore the plotting galleries and examples of different visualization libraries above to learn what’s possible to do in Python. As you will see, the plotting possibilities in Python are numerous and rich. To get started, we suggest starting by learning to use one that suits your needs best, and later extending your knowledge and skills to other visualization libraries as necessary.