statsplotly package¶
- statsplotly.barplot(data: DataFrame | dict[str, Sequence[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]] | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], x: str | None = None, y: str | None = None, orientation: str | None = None, slicer: str | None = None, slice_order: list[str] | None = None, color: str | None = None, color_palette: list[str] | str | None = None, shared_coloraxis: bool = False, color_limits: Sequence[float] | None = None, logscale: float | None = None, colorbar: bool = True, text: str | None = None, axis: str | None = None, opacity: float | None = None, barmode: str | None = None, error_bar: str | None = None, aggregation_func: str | None = None, x_label: str | None = None, y_label: str | None = None, title: str | None = None, x_range: Sequence[float | str] | None = None, y_range: Sequence[float | str] | None = None, fig: Figure = None, row: int | None = None, col: int | None = None) Figure ¶
Draws a barplot across levels of categorical variable.
- Parameters:
data – A
pandas.DataFrame
-compatible structure of datax – The name of the x dimension column in data.
y – The name of the y dimension column in data.
orientation – A
PlotOrientation
value to force the orientation of the plot.slicer – The name of the column in data with values to slice the data : one trace is drawn for each level of the slicer dimension.
slice_order – A list of identifiers to order and/or subset data slices specified by slicer.
color – The name of the column in data with values to map onto the colormap.
color_palette –
A string refering to a built-in plotly, seaborn or matplotlib colormap.
A list of CSS color names or HTML color codes.
- The color palette is used, by order of precedence :
To map color data specified by the color parameter onto the corresponding colormap.
To assign discrete colors to slices of data.
shared_coloraxis – If True, colorscale limits are shared across slices of data.
color_limits – A tuple specifying the (min, max) values of the colormap.
logscale – A float specifying the log base to use for colorscaling.
colorbar – If True, draws a colorbar.
text – A string or the name of the column in data with values to appear in the hover tooltip. Column names can be concatenated with ‘+’ to display values from multiple columns. Ignored when aggregation_func is not None.
axis – A
AxisFormat
value.opacity – A numeric value in the (0, 1) interval to specify bar opacity.
barmode – A
BarMode
value.error_bar – A
ErrorBarType
value or a Callable taking the x or y dimension as input and returning a (inferior_limit, superior_limit) tuple.aggregation_func – A
AggregationType
value or a Callable taking the x or y dimension as input and returning a single value.x_label – A string to label the x_axis in place of the corresponding column name in data.
y_label – A string to label the y_axis in place of the corresponding column name in data.
title – A string for the title of the plot.
x_range – A tuple defining the (min_range, max_range) of the x_axis.
y_range – A tuple defining the (min_range, max_range) of the y_axis.
fig – A
plotly.graph_obj.Figure
to add the plot to. Use in conjunction with row and col.row – An integer identifying the row to add the plot to.
col – An integer identifying the column to add the plot to.
- Returns:
A
plotly.graph_obj.Figure
.
- statsplotly.catplot(data: DataFrame | dict[str, Sequence[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]] | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], x: str | None = None, y: str | None = None, orientation: str | None = None, slicer: str | None = None, slice_order: list[str] | None = None, color: str | None = None, color_palette: list[str] | str | None = None, shared_coloraxis: bool = False, text: str | None = None, marker: str | None = None, axis: str | None = None, opacity: str | float | None = None, plot_type: str | None = None, jitter: float | None = None, normalizer: str | None = None, size: float = 6, x_label: str | None = None, y_label: str | None = None, title: str | None = None, x_range: Sequence[float | str] | None = None, y_range: Sequence[float | str] | None = None, fig: Figure = None, row: int | None = None, col: int | None = None) Figure ¶
Draws a stripplot/boxplot/violinplot across levels of a categorical variable.
- Parameters:
data – A
pandas.DataFrame
-compatible structure of datax – The name of the x dimension column in data.
y – The name of the y dimension column in data.
orientation – A
PlotOrientation
value to force the orientation of the plot.slicer – The name of the column in data with values to slice the data : one trace is drawn for each level of the slicer dimension.
slice_order – A list of identifiers to order and/or subset data slices specified by slicer.
color – The name of the column in data with values to map onto the colormap.
color_palette –
A string refering to a built-in plotly, seaborn or matplotlib colormap.
A list of CSS color names or HTML color codes.
- The color palette is used, by order of precedence :
To map color data specified by the color parameter onto the corresponding colormap.
To assign discrete colors to slices of data.
shared_coloraxis – If True, colorscale limits are shared across slices of data.
text – A string or the name of the column in data with values to appear in the hover tooltip. Column names can be concatenated with ‘+’ to display values from multiple columns.
marker – A valid marker symbol or the name of the column in data with values to assign marker symbols.
axis – A
AxisFormat
value.opacity – A numeric value in the (0, 1) interval or the name of the column in data with values to specify marker opacity.
plot_type – A
CategoricalPlotType
value.jitter – A numeric value to specify jitter amount on the categorical dimension.
normalizer – A
NormalizationType
value to normalize data on the continous dimension.size – A numeric value or the name of the column in data with values to assign mark sizes.
x_label – A string to label the x_axis in place of the corresponding column name in data.
y_label – A string to label the y_axis in place of the corresponding column name in data.
title – A string for the title of the plot.
x_range – A tuple defining the (min_range, max_range) of the x_axis.
y_range – A tuple defining the (min_range, max_range) of the y_axis.
fig – A
plotly.graph_obj.Figure
to add the plot to. Use in conjunction with row and col.row – An integer identifying the row to add the plot to.
col – An integer identifying the column to add the plot to.
- Returns:
A
plotly.graph_obj.Figure
.
- statsplotly.distplot(data: DataFrame, x: str | None = None, y: str | None = None, slicer: str | None = None, slice_order: list[str] | None = None, color_palette: list[str] | str | None = None, axis: str | None = None, opacity: float | None = None, hist: bool = True, rug: bool | None = None, ecdf: bool | None = None, kde: bool | None = None, step: bool | None = None, equal_bins: bool | None = None, bins: Sequence[float] | int | str | None = None, cumulative: bool | None = None, histnorm: str | None = None, central_tendency: str | None = None, vlines: dict[str, tuple[str, float]] | None = None, hlines: dict[str, tuple[str, float]] | None = None, barmode: str | None = None, x_label: str | None = None, y_label: str | None = None, title: str | None = None, x_range: Sequence[float] | None = None, y_range: Sequence[float] | None = None, fig: Figure = None, row: int | None = None, col: int | None = None) Figure ¶
Draws the distribution of x (vertical histogram) or y (horizontal histograms) values.
- Parameters:
data – A
pandas.DataFrame
-compatible structure of datax – The name of the x dimension column in data. If not None, draws vertical histograms.
y – The name of the y dimension column in data. If not None, draws horizontal histograms.
slicer – The name of the column in data with values to slice the data : one trace is drawn for each level of the slicer dimension.
slice_order – A list of identifiers to order and/or subset data slices specified by slicer.
color_palette –
A string refering to a built-in plotly, seaborn or matplotlib colormap.
A list of CSS color names or HTML color codes.
The color palette is used to assign discrete colors to slices of data.
axis – A
AxisFormat
value.opacity – A numeric value in the (0, 1) interval to specify bar and line opacity.
hist – If True, plot histogram bars.
rug – If True, plot rug bars of the underlying data.
ecdf – If True, plot the Empirical Cumulative Density Function.
kde – If True, plot a line of a Kernel Density Estimation of the distribution.
step – If True, plot a step histogram instead of a standard histogram bars.
equal_bins – If True, uses the same bins for all slices in the data.
bins – A string, integer, or sequence specifying the bins parameter for
numpy.histogram()
.cumulative – If True, draws a cumulative histogram.
histnorm – A
HistogramNormType
value.central_tendency – A
CentralTendencyType
value.vlines – A dictionary of {slice: (line_name, vertical_coordinates)} to draw vertical lines.
hlines – A dictionary of {slice: (line_name, horizontal_coordinates)} to draw horizontal lines.
barmode – A
HistogramBarMode
value.x_label – A string to label the x_axis in place of the corresponding column name in data.
y_label – A string to label the y_axis in place of the corresponding column name in data.
title – A string for the title of the plot.
x_range – A tuple defining the (min_range, max_range) of the x_axis.
y_range – A tuple defining the (min_range, max_range) of the y_axis.
fig – A
plotly.graph_obj.Figure
to add the plot to. Use in conjunction with row and col.row – An integer identifying the row to add the plot to.
col – An integer identifying the column to add the plot to.
- Returns:
A
plotly.graph_obj.Figure
.
- statsplotly.heatmap(data: DataFrame | dict[str, Sequence[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]] | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], x: str | None = None, y: str | None = None, z: str | None = None, slicer: str | None = None, slice_order: list[str] | None = None, color_palette: list[str] | str | None = None, shared_coloraxis: bool = False, color_limits: Sequence[float] | None = None, logscale: float | None = None, colorbar: bool = True, text: str | None = None, axis: str | None = None, opacity: float | None = None, normalizer: str | None = None, x_label: str | None = None, y_label: str | None = None, z_label: str | None = None, title: str | None = None, x_range: Sequence[float | str] | None = None, y_range: Sequence[float | str] | None = None, fig: Figure = None, row: int | None = None, col: int | None = None) Figure ¶
Draws a heatmap.
- Parameters:
data – A
pandas.DataFrame
-compatible structure of datax – The name of the x dimension column in data.
y – The name of the y dimension column in data.
z – The name of the z dimension (i.e., color) column in data.
slicer – The name of the column in data with values to slice the data : one trace is drawn for each level of the slicer dimension.
slice_order – A list of identifiers to order and/or subset data slices specified by slicer.
color_palette –
A string refering to a built-in plotly, seaborn or matplotlib colormap.
A list of CSS color names or HTML color codes.
- The color palette is used, by order of precedence :
To map color data specified by the color parameter onto the corresponding colormap.
To assign discrete colors to slices of data.
shared_coloraxis – If True, colorscale limits are shared across slices of data.
color_limits – A tuple specifying the (min, max) values of the colormap.
logscale – A float specifying the log base to use for colorscaling.
colorbar – If True, draws a colorbar.
text – A string or the name of the column in data with values to appear in the hover tooltip. Column names can be concatenated with ‘+’ to display values from multiple columns.
axis – A
AxisFormat
value.opacity – A numeric value in the (0, 1) interval to specify heatmap opacity.
normalizer – The normalizer for the z dimension. A
NormalizationType
value.x_label – A string to label the x_axis in place of the corresponding column name in data.
y_label – A string to label the y_axis in place of the corresponding column name in data.
z_label – A string to label the coloraxis in place of the corresponding column name in data.
title – A string to label the resulting plot.
x_range – A tuple defining the (min_range, max_range) of the x_axis.
y_range – A tuple defining the (min_range, max_range) of the y_axis.
fig – A
plotly.graph_obj.Figure
to add the plot to. Use in conjunction with row and col.row – An integer identifying the row to add the plot to.
col – An integer identifying the colum to add the plot to.
- Returns:
A
plotly.graph_obj.Figure
.
- statsplotly.jointplot(data: DataFrame | dict[str, Sequence[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]] | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], x: str | None = None, y: str | None = None, slicer: str | None = None, slice_order: list[str] | None = None, color: str | None = None, color_palette: list[str] | str | None = None, shared_coloraxis: bool = False, color_limits: Sequence[float] | None = None, logscale: float | None = None, colorbar: bool = True, text: str | None = None, marker: str | None = None, mode: str | None = TraceMode.MARKERS, axis: str | None = None, marginal_plot: str | None = MarginalPlotDimension.ALL, kde_color_palette: list[str] | str = 'magma', hist: bool = True, rug: bool | None = None, ecdf: bool | None = None, kde: bool | None = None, step: bool | None = None, equal_bins_x: bool | None = None, equal_bins_y: bool | None = None, bins_x: Sequence[float] | int | str = 'scott', bins_y: Sequence[float] | int | str = 'scott', histnorm: str | None = None, central_tendency: str | None = None, barmode: str | None = None, plot_type: str = JointplotType.SCATTER, opacity: float = 0.8, jitter_x: float = 0, jitter_y: float = 0, normalizer_x: str | None = None, normalizer_y: str | None = None, shaded_error: str | None = None, error_x: str | None = None, error_y: str | None = None, fit: str | None = None, size: float | str | None = None, x_label: str | None = None, y_label: str | None = None, title: str | None = None, x_range: Sequence[float | str] | None = None, y_range: Sequence[float | str] | None = None, fig: Figure = None, row: int | None = None, col: int | None = None) Figure ¶
Draws a plot of two variables with bivariate and univariate graphs.
- Parameters:
data – A
pandas.DataFrame
-compatible structure of datax – The name of the x dimension column in data.
y – The name of the y dimension column in data.
slicer – The name of the column in data with values to slice the data : one trace is drawn for each level of the slicer dimension.
slice_order – A list of identifiers to order and/or subset data slices specified by slicer.
color – The name of the column in data with values to map onto the colormap. Specifying a color along with marginal != None raises a StatsPlotSpecificationError.
color_palette –
A string refering to a built-in plotly, seaborn or matplotlib colormap.
A list of CSS color names or HTML color codes.
- The color palette is used, by order of precedence :
To map color data specified by the color parameter onto the corresponding colormap.
To assign discrete colors to slices of data.
shared_coloraxis – If True, colorscale limits are shared across slices of data.
color_limits – A tuple specifying the (min, max) values of the colormap.
logscale – A float specifying the log base to use for colorscaling.
colorbar – If True, draws a colorbar.
text – A string or the name of the column in data with values to appear in the hover tooltip. Column names can be concatenated with ‘+’ to display values from multiple columns.
marker – A valid marker symbol or the name of the column in data with values to assign marker symbols.
mode – A
TraceMode
value.axis – A
AxisFormat
value.opacity – A numeric value in the (0, 1) interval to specify bar and line opacity.
marginal_plot – A
MarginalPlotDimension
value.kde_color_palette – The color_palette for the Kernel Density Estimation map.
hist – If True, plot histogram bars.
rug – If True, plot rug bars of the underlying data.
ecdf – If True, plot the Empirical Cumulative Density Function.
kde – If True, plot a line of a Kernel Density Estimation of the distribution.
step – If True, plot a step histogram instead of a standard histogram bars.
equal_bins_x – If True, uses the same bins for the x dimension of all slices in the data.
equal_bins_y – If True, uses the same bins for the y dimension of all slices in the data.
bins_x – A string, integer, or sequence specifying the bins parameter for the x dimension for
numpy.histogram()
.bins_y – A string, integer, or sequence specifying the bins parameter for the y dimension for
numpy.histogram()
.histnorm – A
HistogramNormType
value.central_tendency – A
CentralTendencyType
value.barmode – A
BarMode
value.plot_type – A
JointplotType
value.opacity – A numeric value in the (0, 1) interval to specify marker opacity.
jitter_x – A numeric value to specify jitter amount on the x dimension.
jitter_y – A numeric value to specify jitter amount on the y dimension.
normalizer_x – The normalizer for the x dimension. A
NormalizationType
value.normalizer_y – The normalizer for the y dimension. A
NormalizationType
value.shaded_error – The name of the column in data with values to plot continuous error shade.
error_x – The name of the column in data with values to plot error bar in the x dimension.
error_y – The name of the column in data with values to plot error bar in the y dimension.
fit – A
RegressionType
value. Computes and plot the corresponding regression.size – A numeric value or the name of the column in data with values to assign mark sizes.
x_label – A string to label the x_axis in place of the corresponding column name in data.
y_label – A string to label the y_axis in place of the corresponding column name in data.
title – A string for the title of the plot.
x_range – A tuple defining the (min_range, max_range) of the x_axis.
y_range – A tuple defining the (min_range, max_range) of the y_axis.
fig – A
plotly.graph_obj.Figure
to add the plot to. Use in conjunction with row and col.row – An integer identifying the row to add the plot to.
col – An integer identifying the column to add the plot to.
- Returns:
A
plotly.graph_obj.Figure
.
- statsplotly.plot(data: DataFrame | dict[str, Sequence[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]] | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], x: str | None = None, y: str | None = None, z: str | None = None, slicer: str | None = None, slice_order: list[str] | None = None, color: str | None = None, color_palette: list[str] | str | None = None, shared_coloraxis: bool = False, color_limits: Sequence[float] | None = None, logscale: float | None = None, colorbar: bool = True, text: str | None = None, marker: str | None = None, mode: str | None = None, axis: str | None = None, opacity: str | float | None = None, jitter_x: float = 0, jitter_y: float = 0, jitter_z: float = 0, normalizer_x: str | None = None, normalizer_y: str | None = None, normalizer_z: str | None = None, shaded_error: str | None = None, error_x: str | None = None, error_y: str | None = None, error_z: str | None = None, fit: str | None = None, size: float | str | None = None, x_label: str | None = None, y_label: str | None = None, z_label: str | None = None, title: str | None = None, x_range: Sequence[float | str] | None = None, y_range: Sequence[float | str] | None = None, z_range: Sequence[float | str] | None = None, fig: Figure = None, row: int | None = None, col: int | None = None, secondary_y: bool = False) Figure ¶
Draws a line/scatter plot across levels of a categorical variable.
- Parameters:
data – A
pandas.DataFrame
-compatible structure of datax – The name of the x dimension column in data.
y – The name of the y dimension column in data.
z – The name of the z dimension column in data.
slicer – The name of the column in data with values to slice the data : one trace is drawn for each level of the slicer dimension.
slice_order – A list of identifiers to order and/or subset data slices specified by slicer.
color – The name of the column in data with values to map onto the colormap.
color_palette –
A string refering to a built-in plotly, seaborn or matplotlib colormap.
A list of CSS color names or HTML color codes.
- The color palette is used, by order of precedence :
To map color data specified by the color parameter onto the corresponding colormap.
To assign discrete colors to slices of data.
shared_coloraxis – If True, colorscale limits are shared across slices of data.
color_limits – A tuple specifying the (min, max) values of the colormap.
logscale – A float specifying the log base to use for colorscaling.
colorbar – If True, draws a colorbar.
text – A string or the name of the column in data with values to appear in the hover tooltip. Column names can be concatenated with ‘+’ to display values from multiple columns.
marker – A valid marker symbol or the name of the column in data with values to assign marker symbols.
mode – A
TraceMode
value.axis – A
AxisFormat
value.opacity – A numeric value in the (0, 1) interval or the name of the column in data with values to specify marker opacity.
jitter_x – A numeric value to specify jitter amount on the x dimension.
jitter_y – A numeric value to specify jitter amount on the y dimension.
jitter_z – A numeric value to specify jitter amount on the z dimension.
normalizer_x – The normalizer for the x dimension. A
NormalizationType
value.normalizer_y – The normalizer for the y dimension. A
NormalizationType
value.normalizer_z – The normalizer for the z dimension. A
NormalizationType
value.shaded_error – The name of the column in data with values to plot continuous error shade.
error_x – The name of the column in data with values to plot error bar in the x dimension.
error_y – The name of the column in data with values to plot error bar in the y dimension.
error_z – The name of the column in data with values to plot error bar in the z dimension.
fit – A
RegressionType
value. Computes and plot the corresponding regression.size – A numeric value or the name of the column in data with values to assign mark sizes.
x_label – A string to label the x_axis in place of the corresponding column name in data.
y_label – A string to label the y_axis in place of the corresponding column name in data.
z_label – A string to label the z_axis in place of the corresponding column name in data.
title – A string for the title of the plot.
x_range – A tuple defining the (min_range, max_range) of the x_axis.
y_range – A tuple defining the (min_range, max_range) of the y_axis.
z_range – A tuple defining the (min_range, max_range) of the z_axis.
fig – A
plotly.graph_obj.Figure
to add the plot to. Use in conjunction with row and col.row – An integer identifying the row to add the plot to.
col – An integer identifying the column to add the plot to.
secondary_y – If True, plot on a secondary y_axis of the fig object.
- Returns:
A
plotly.graph_obj.Figure
.
Subpackages¶
- statsplotly.plot_objects package
- statsplotly.plot_specifiers package
- Subpackages
- Submodules
- statsplotly.plot_specifiers.common module
- statsplotly.plot_specifiers.trace module
CategoricalPlotSpecifier
CategoricalPlotType
HistogramSpecifier
HistogramSpecifier.bin_edges
HistogramSpecifier.bins
HistogramSpecifier.central_tendency
HistogramSpecifier.cumulative
HistogramSpecifier.data_type
HistogramSpecifier.dimension
HistogramSpecifier.ecdf
HistogramSpecifier.hist
HistogramSpecifier.histnorm
HistogramSpecifier.kde
HistogramSpecifier.rug
HistogramSpecifier.step
HistogramSpecifier.check_bins
HistogramSpecifier.check_cumulative
HistogramSpecifier.check_dimension
HistogramSpecifier.check_histnorm
HistogramSpecifier.check_parameter_consistency
HistogramSpecifier.compute_ecdf()
HistogramSpecifier.compute_histogram()
HistogramSpecifier.get_distribution_max_value()
HistogramSpecifier.get_histogram_bin_edges()
HistogramSpecifier.density
JointplotSpecifier
JointplotSpecifier.histogram_specifier
JointplotSpecifier.marginal_plot
JointplotSpecifier.plot_type
JointplotSpecifier.scatter_specifier
JointplotSpecifier.check_scatter_specifier
JointplotSpecifier.compute_histmap()
JointplotSpecifier.histogram2d()
JointplotSpecifier.plot_kde
JointplotSpecifier.plot_scatter
JointplotSpecifier.plot_x_distribution
JointplotSpecifier.plot_y_distribution
JointplotType
MarginalPlotDimension
OrientedPlotSpecifier
PlotOrientation
ScatterSpecifier
TraceMode
Submodules¶
statsplotly.constants module¶
statsplotly.exceptions module¶
Custom exceptions.
- exception statsplotly.exceptions.StatsPlotSpecificationError¶
Bases:
ValueError
Raises when plot arguments are incompatibles.
statsplotly.utils module¶
- pydantic model statsplotly.utils.SubplotGridFormatter¶
Bases:
_SubplotGridValidator
Wraps a Plotly Figure with methods to format the subplot grid.
- fig¶
A
plotly.graph_objects.Figure
with a subplot grid.
- Fields:
- Validators:
- set_common_axis_limit(shared_grid_axis: str = SharedGridAxis.ALL, plot_axis: str | None = None, common_range: bool = True, link_axes: bool = False) SubplotGridFormatter ¶
Set common axis limits of a plot axis along a shared grid axis, optionally linking the axes.
- Parameters:
shared_grid_axis – A
SharedGridAxis
value.plot_axis –
A
PlotAxis
value.common_range – If True (default), set a common range for the axes targeted by plot_axis.
link_axes – If True (default to False), links the axes targeted by plot_axis.
- Returns:
A
SubplotGridFormatter
instance.
- set_common_coloraxis(shared_grid_axis: str) SubplotGridFormatter ¶
Set a common coloraxis along a shared grid axis
- Parameters:
shared_grid_axis – A
SharedGridAxis
value.- Returns:
A
SubplotGridFormatter
instance.
- tidy_subplots(title: str | None = None, no_legend: bool = False, row_titles: list[str] | None = None, col_titles: list[str] | None = None) SubplotGridFormatter ¶
Tidy a subplot grid by removing redundant axis titles and optionally adding annotations.
- Parameters:
title – A string for the figure title.
no_legend – If True, hides the legend.
row_titles – A list of string the size of the row dimension specifying a title for each row.
col_titles – A list of string the size of the column dimension specifying a title for each column.
- Returns:
A
SubplotGridFormatter
instance.
- statsplotly.utils.rgb_string_array_from_colormap(n_colors: int, color_palette: str | list[str] | list[tuple[float, float, float]] | Colormap | None) list[str] ¶
Returns a list of RGB string given n_colors and a color_palette reference.
This function attempts to extract RGB color values from built-in Plotly, Seaborn and finally Matplotlib colormaps.