graphinglib.Figure.__init__#
- Figure.__init__(x_label: str | None = None, y_label: str | None = None, size: tuple[float, float] | Literal['default'] = 'default', title: str | None = None, x_lim: tuple[float, float] | None = None, y_lim: tuple[float, float] | None = None, log_scale_x: bool | Literal['default'] = 'default', log_scale_y: bool | Literal['default'] = 'default', show_grid: bool | Literal['default'] = 'default', remove_axes: bool = False, aspect_ratio: float | str = 'auto', figure_style: str = 'default') None [source]#
This class implements a general figure object.
- Parameters:
- x_label, y_labelstr, optional
The indentification for the x-axis and y-axis. Defaults to
"x axis"
and"y axis"
.- x_lim, y_limtuple[float, float], optional
The limits for the x-axis and y-axis.
- sizetuple[float, float]
Overall size of the figure. Default depends on the
figure_style
configuration.- title: str, optional
The title of the figure.
- log_scale_x, log_scale_ybool
Whether or not to set the scale of the x- or y-axis to logaritmic scale. Default depends on the
figure_style
configuration.- show_gridbool
Whether or not to show the grid. Default depends on the
figure_style
configuration.- remove_axesbool
Whether or not to show the axes. Useful for adding tables or text to the subfigure. Defaults to
False
.- aspect_ratiofloat, str
The aspect ratio of the axis scaling. Can be either “equal”, “auto” or a float. Defaults to “auto”.
- figure_stylestr
The figure style to use for the figure. Default can be set using
gl.set_default_style()
.