PlotCanvas¶
- class PlotCanvas(*args: Any, **kwargs: Any)[source]¶
Main Plot canvas widget.
This class extends the FigureCanvas class.
- Access with:
canvas = gui.canvas
- Parameters:
design (QDesign) – The design.
parent (QMainWindowPlot) – The main window. Defaults to None.
logger (logging.Logger) – The logger. Defaults to None.
statusbar_label (str) – Statusbar label. Defaults to None.
Methods
- __call__(*args: Any, **kwargs: Any) Any¶
Call self as a function.
- __getitem__(key: Any) _MockObject¶
- clear_annotation()[source]¶
Clear the annotations.
- Raises:
Exception – Error while clearing the annotations
- clear_axis(ax: Axes = None)[source]¶
Clear an axis or clear all axes.
- Parameters:
ax (plt.Axes) – Clear an axis, or if None, then clear all axes. Defaults to None.
- find_component_bounds(components: List[str], zoom: float = 1.2)[source]¶
Find bounds of a set of components.
- highlight_components(component_names: List[str])[source]¶
Highlight a list of components.
- Parameters:
component_names (List[str]) – A list of component names
- set_component(name: str)[source]¶
Shortcut to set a component in the component widget to be examined.
- Parameters:
name (str) – Name of the component in the design
- setup_rendering()[source]¶
Line segment simplificatio: For plots that have line segments (e.g. typical line plots, outlines of polygons, etc.), rendering performance can be controlled by the path.simplify and path.simplify_threshold.
- path_simplify:
When True, simplify paths by removing “invisible” points to reduce file size and increase rendering speed
- path_simplify_threshold:
The threshold of similarity below which vertices will be removed in the simplification process
- chuncksize:
0 to disable; values in the range 10000 to 100000 can improve speed slightly and prevent an Agg rendering failure when plotting very large data sets, especially if they are very gappy. It may cause minor artifacts, though. A value of 20000 is probably a good starting point.
https://matplotlib.org/3.1.1/tutorials/introductory/usage.html
- style_axis(ax, num: int)[source]¶
Style the axis.
- Parameters:
ax (axis) – The axis
num (int) – Not used