toggle_pylab

sunpy.visualization.toggle_pylab(fn)[source] [edit on github]

A decorator to prevent functions from opening matplotlib windows unexpectedly when sunpy is run in interactive shells like ipython –pylab.

Toggles the value of matplotlib.pyplot.isinteractive() to preserve the users’ expectations of pylab’s behaviour in general.

Parameters:fn (function object) –

?

Returns:
  • ? (?) – ?
  • .. todo:: – improve documentation