Either interactively, such as from within an Ipython session, or from within a script, how can you determine which backend is being used by matplotlib?
Another way to determine the current backend is to read rcParams dictionary:
rcParams
>>> import matplotlib >>> print (matplotlib.rcParams['backend']) MacOSX >>> matplotlib.use('agg') >>> print (matplotlib.rcParams['backend']) agg