obspy.core.util.misc.MatplotlibBackend¶
-
class
MatplotlibBackend
(backend, sloppy=True)[source]¶ Bases:
object
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
, usesmatplotlib.pyplot.switch_backend()
and no warning will be shown if the backend was not switched successfully. IfFalse
, additionally tries to usematplotlib.use()
first and also shows a warning if the backend was not switched successfully.
Attributes
__dict__
__doc__
__module__
__weakref__
list of weak references to the object (if defined) Public Methods
switch_backend
Switch matplotlib backend. Special Methods
__dir__
Default dir() implementation. __enter__
__exit__
__format__
Default object formatter. __init__
Initialize self. __init_subclass__
This method is called when a class is subclassed. __new__
Create and return a new object. __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().