utils
AxesType
module-attribute
AxesType: Type[Union["MplAxes", "MplAxes3D", "BkFigure"]] = Union[
"MplAxes", "MplAxes3D", "BkFigure"
]
Plottable
module-attribute
Plottable: Type[
Union[
"MplAxes", "MplAxes3D", "MplFigure", "BkGridPlot", "BkFigure", Iterable
]
] = Union[
"MplAxes", "MplAxes3D", "MplFigure", "BkGridPlot", "BkFigure", Iterable
]
addPrincipleAxis
addPrincipleAxis(
ax: "PolarAxes",
*,
length: float = 1.15,
arrow_length: float = 0.05,
relative: bool = True
) -> "PolarAxes"
Add the principle axis to the polar plot.
PARAMETER | DESCRIPTION |
---|---|
ax
|
Polar axes to add the principle axis
TYPE:
|
length
|
Length of the principle axis, by default 1.15
TYPE:
|
arrow_length
|
Length of the arrow, by default 0.05
TYPE:
|
relative
|
Whether the length is relative to the maximum radius, by default True
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
PolarAxes
|
Polar axes with the principle axis added |
extract_axes
setAxesProps
setAxesProps(
ax: "MplAxes",
*,
unpack_dict: bool = True,
unpack_tuple: bool = True,
**kwargs
) -> None
Set the properties for the axes. For legends, lines with same label will be combined.
PARAMETER | DESCRIPTION |
---|---|
ax
|
Axes to set properties
TYPE:
|
unpack_dict
|
Whether to unpack the dict, by default True
TYPE:
|
unpack_tuple
|
Whether to unpack the tuple, by default True
TYPE:
|
kwargs
|
Keyword arguments for the
DEFAULT:
|
setupPiPlane
setupPiPlane(
ax: "PolarAxes",
*,
length: float = 1.15,
arrow_length: float = 0.05,
grid_length: float = 1.05,
show_sectors: bool = False,
show_xylabel: bool = False,
show_xticks: bool = False,
show_xticklabels: bool = False,
show_yticks: bool = True,
show_yticklabels: bool = False,
yticks_min: float = 0.0,
yticks_max: float = 1.0,
ytiks_num: int = 6,
relative: bool = True
) -> "PolarAxes"
Setup the pi-plane for the polar plot.
PARAMETER | DESCRIPTION |
---|---|
ax
|
Polar axes to add the principle axis
TYPE:
|
length
|
Length of the principle axis, by default 1.15
TYPE:
|
arrow_length
|
Length of the arrow, by default 0.05
TYPE:
|
grid_length
|
Length of the grid, by default 1.05
TYPE:
|
show_sectors
|
Whether to show the sectors, by default False
TYPE:
|
yticks_min
|
Minimum value of the yticks, by default 0.0
TYPE:
|
yticks_max
|
Maximum value of the yticks, by default 1.0
TYPE:
|
ytiks_num
|
Number of yticks, by default 6
TYPE:
|
relative
|
Whether the length is relative to the maximum radius, by default True
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
PolarAxes
|
Polar axes with the principle axis added |
subplots
subplots(
numfig: int = 1,
*,
numfig_extra: int = 0,
on: Plottable | None = None,
ncols: int = 2,
subfigsize: Tuple[int | float, int | float] = (6, 4),
figsize: Tuple[int | float, int | float] | None = None,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
squeeze: bool = True,
ensure_1d: bool = False,
ensure_2d: bool = False,
clear_unused_axes: bool = True,
numbering: Literal["numeric", "alphabetic"] | None = None,
numbering_title_kwargs: Dict[str, Any] | None = None,
projection: str | List[str] | None = None,
**subplot_kw
) -> AxesType | List[AxesType] | List[List[AxesType | None]]
Create (or get) a list of axes (matplotlib) or figures (bokeh) for subplots.
PARAMETER | DESCRIPTION |
---|---|
numfig
|
Number of figures to create, by default 1
TYPE:
|
numfig_extra
|
Extra number of figures to create, by default 0
TYPE:
|
on
|
Axes to plot on, by default None
TYPE:
|
ncols
|
Number of columns, by default 2
TYPE:
|
subfigsize
|
Subfigure size, by default (6, 4) |
figsize
|
Figure size, higher priority than |
backend
|
Backend to use when creating new figures , by default None which means the backend set in the environment
variable
TYPE:
|
squeeze
|
Whether to squeeze the returned axes, by default False.
TYPE:
|
ensure_1d
|
Whether to ensure the returned axes is 1d, by default False
TYPE:
|
ensure_2d
|
Whether to ensure the returned axes is 2d, by default False
TYPE:
|
clear_unused_axes
|
Whether to clear the newly created unused axes, by default True
TYPE:
|
numbering
|
Numbering style for subplots, by default None
TYPE:
|
numbering_title_kwargs
|
Keyword arguments for the title of the numbering, by default None |
projection
|
Projection for the axes, can be a single projection for all axes or a list of projections for each axes, by default None |
subplot_kw
|
Keyword arguments for the
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
AxesType or List[AxesType] or List[List[AxesType | None]]
|
Depending on the value of
Otherwise, if
In other cases, a list of lists of axes or figures is always returned. If a list of lists of axes or figures should be returned and |