scistag.plotstag.layers.matplot_layer.MPLayerLock

class MPLayerLock(target_plot, size_ratio=None, **params)[source]

Bases: MPLock

Helper class which helps inserting an image layer to a PlotStag by automatically fetching the latest current matplotlib figure upon exiting

Parameters
  • target_plot (Plot) – The plot to which the figure shall be added

  • size_ratio (float | None) – If set the matplot plot’s original size will be enforced.

  • params – The parameters to be passed into the figure

Methods

Attributes

__dict__

__doc__

__module__

__weakref__

list of weak references to the object (if defined)

access_lock

Shared access lock to prevent multiple thread using Matplotlib at the same time

target_plot

The plot to which the matplot figure shall be added

access_lock = <scistag.common.mt.stag_lock.StagLock object>

Shared access lock to prevent multiple thread using Matplotlib at the same time

backend: str | None

The backend to be used

pl

Link to the module once valid

target_plot

The plot to which the matplot figure shall be added