viz/base.py¶
VizBase
¶
Provide a visualization class.
Parameters:
-
(dpi¶int, default:150) –set resolution for rasterized images
-
(font_size¶int, default:11) –set MatPlotLib default font size
-
(font_family¶str, default:'Arial') –set MatPlotLib default font family
Attributes:
-
dpi(int) –rasterization resolution
-
fdict(dict) –dictionary to which each figure is appended as it is generated
-
markers(dict) –selected markers for scatter plots
Methods:
-
create_figure–Initialize a Pyplot figure.
Source code in wmbe/viz/base.py
create_figure
¶
create_figure(
name: str, size: tuple[float, float] | None = None, dpi: int | None = None
) -> Figure
Initialize a Pyplot figure.
Set its size and DPI. Append it to the figures dictionary.
Parameters:
-
(name¶str) –name of figure; used as key in figures dictionary
-
(size¶tuple[float, float] | None, default:None) –optional width and height of figure in inches
-
(dpi¶int | None, default:None) –rasterization resolution
Returns:
-
Figure–reference to MatPlotLib/Pyplot figure