Book Image

Mastering Matplotlib 2.x

By : Benjamin Walter Keller
Book Image

Mastering Matplotlib 2.x

By: Benjamin Walter Keller

Overview of this book

In this book, you’ll get hands-on with customizing your data plots with the help of Matplotlib. You’ll start with customizing plots, making a handful of special-purpose plots, and building 3D plots. You’ll explore non-trivial layouts, Pylab customization, and more about tile configuration. You’ll be able to add text, put lines in plots, and also handle polygons, shapes, and annotations. Non-Cartesian and vector plots are exciting to construct, and you’ll explore them further in this book. You’ll delve into niche plots and visualize ordinal and tabular data. In this book, you’ll be exploring 3D plotting, one of the best features when it comes to 3D data visualization, along with Jupyter Notebook, widgets, and creating movies for enhanced data representation. Geospatial plotting will also be explored. Finally, you’ll learn how to create interactive plots with the help of Jupyter. Learn expert techniques for effective data visualization using Matplotlib 3 and Python with our latest offering -- Matplotlib 3.0 Cookbook
Table of Contents (7 chapters)

Drawing on Plots

Till now, we have studied how to use style sheets to customize plot appearances, and how to tweak multi-panel plots to give more complex and appealing layouts for different kinds of plotting applications.

Matplotlib allows you to make plots that really show your own individual style. We will learn how to draw on plots to provide the viewer with visual guides that point them toward the important features of data. We will discuss adding horizontal and vertical lines, along with tweaking a background grid.

Versatile annotating adds arrows and some text to these arrows to the plots in order to customize the appearance of these annotations.

In this chapter, we will look at the following topics:

  • How to put lines in place
  • How to add text on plots
  • How to play with polygons and shapes
  • How to add different kinds of annotations
...