obspy.core.util.misc.MatplotlibBackend

class MatplotlibBackend(backend, sloppy=True)[source]

Bases: future.types.newobject.newobject

A helper class for switching the matplotlib backend.

Can be used as a context manager to temporarily switch the backend or by using the switch_backend() staticmethod.

The context manager has no effect when setting backend=None.

Parameters:
  • backend (str) Name of matplotlib backend to switch to.
  • sloppy (bool) If True, uses matplotlib.pyplot.switch_backend() and no warning will be shown if the backend was not switched successfully. If False, additionally tries to use matplotlib.use() first and also shows a warning if the backend was not switched successfully.

Attributes

__dict__
__doc__ unicode(object=’‘) -> unicode object
__module__ str(object=’‘) -> string
__weakref__ list of weak references to the object (if defined)

Public Methods

next
switch_backend Switch matplotlib backend.

Special Methods

__enter__
__exit__
__format__ default object formatter
__init__
__long__
__native__ Hook for the future.utils.native() function
__new__
__nonzero__
__reduce__ helper for pickle
__reduce_ex__ helper for pickle
__sizeof__ size of object in memory, in bytes
__subclasshook__ Abstract classes can override this to customize issubclass().
__unicode__