scistag.plotstag.plot_layer.PlotLayer¶
- class PlotLayer(fixed_size=None)[source]¶
Bases:
objectThe
PlotLayervisualizes a plot’s content.Such content types can be bar graphs, scatter plots, line graphs, pie charts, images, matrices etc.
- Parameters
fixed_size (Size2D | None) – If specified this layer will try to enforce the size specified in pixels, e.g to guarantee a 1:1 projection of an image or matrix with a desired content cell to pixel ratio.
Methods
Paints the layer's content :type canvas:
Canvas:param canvas: The target canvas into which the content shall be painted.Updates the layout (especially .size) with the size foreseen by the plot :type desired_size: Size2D | None :param desired_size: The proposed size by the plot :type forced_size: Size2D | None :param forced_size: Enforced size i f the size can under no circumstances be influenced by a layer.
Attributes
__dict____doc____module____weakref__list of weak references to the object (if defined)
The fixed size.
The effective size of this layer in pixels
The range of the values stored in this layer
Defines if the layer needs to be precisely clipped because it can not be guaranteed that all elements will be painted precisely inside.
- abstract paint(canvas)[source]¶
Paints the layer’s content :type canvas:
Canvas:param canvas: The target canvas into which the content shall bepainted.
- update_layout(desired_size=None, forced_size=None)[source]¶
Updates the layout (especially .size) with the size foreseen by the plot :type desired_size: Size2D | None :param desired_size: The proposed size by the plot :type forced_size: Size2D | None :param forced_size: Enforced size i f the size can under no
circumstances be influenced by a layer.
- needs_clipping¶
Defines if the layer needs to be precisely clipped because it can not be guaranteed that all elements will be painted precisely inside.
- value_range: PlotValueRange2D | PlotValueRange3D¶
The range of the values stored in this layer