Figure¶
-
class
nata.plots.
Figure
(figsize: Optional[Tuple[float]] = None, nrows: Optional[int] = 1, ncols: Optional[int] = 1, style: Optional[str] = 'light', fname: Optional[str] = None, rc: Optional[Dict[str, Any]] = None)¶ Container of parameters and child objects (including plotting backend-related objects) relevant to draw a figure.
- Parameters
figsize (
tuple
offloat
, optional) – Tuple containing the width and height of the figure canvas in inches. If not provided, defaults to(6,4)
.nrows (
int
, optional) – Number of rows available for figure axes. If not provided, defaults to1
.ncols (
int
, optional) – Number of columns available for figure axes. If not provided, defaults to1
.style (
{'light', 'dark'}
, optional) – Selection of standard nata style. If not provided, defaults to'light'
.fname (
str
, optional) – Path to file with custom plotting backend parameters.rc (
dict
, optional) – Dictionary with custom plotting backend parameters. Overrides parameters given infname
.
-
show
()¶ Shows the figure.
-
save
(path, format: Optional[str] = None, dpi: Optional[float] = 150)¶ Saves the figure to a file.
- Parameters
path (
tuple
offloat
, optional) – Path in which to store the file.format (
str
, optional) – File format, e.g.'png'
,'pdf'
,'svg'
. If not provided, the output format is inferred from the extension ofpath
.dpi (
float
, optional) – Resolution in dots per inch. If not provided, defaults to150
.
-
property
axes
¶ Dictionary of child
nata.plots.Axes
objects, where the key to each axes is itsindex
property