You can pretend to have set the wrong backend argument, then it will return you a ValueError with a list of valid matplotlib backends, for example:
Input data:
import matplotlib matplotlib.use('WRONG_ARG')
Exit:
ValueError: Unrecognized backend string 'test': valid strings are ['GTK3Agg', 'GTK3Cairo', 'MacOSX', 'nbAgg', 'Qt4Agg', 'Qt4Cairo', 'Qt5Agg', 'Qt 5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']
rangsiman Jun 23 '19 at 4:54 2019-06-23 04:54
source share