For interactive plotting, the usual %matplotlib inline does not work as it outputs a static figure to the screen. We need to use one of the backends supported by Matplotlib. You may recall that the backend is the lowermost layer of Matplotlib architecture where the output figure created by Matplotlib is sent for display. There are two types of backends: one allows users to interact with the output and is used in interactive plotting, and the other is used to save figures for printing or embedding into other applications.
All the recipes in this chapter are tested with the following backends:
- nbAgg
- Qt5Agg
- TkAgg
- WXAgg
We have observed that a few features do not work with some of these backends.
Use one of the following options to activate any of these backends:
import matplotlib
matplotlib.use('nbAgg')
Or use this:
import matplotlib.pyplot as plt
plt.switch_backend...