graphinglib.SmartTwinAxis.set_visual_params#

SmartTwinAxis.set_visual_params(reset: bool = False, edge_color: str | None = None, label_color: str | None = None, label_pad: float | None = None, line_width: float | None = None, font_family: str | None = None, font_size: float | None = None, font_weight: str | None = None, use_latex: bool | None = None, hide_spine: bool | None = None) Self[source]#

Customize the visual style of the twin axis.

Parameters:
resetbool, optional

If True, resets all previously set visual parameters to their default values for the specified figure_style before applying the new parameters. Defaults to False.

edge_colorstr, optional

The color of the spine.

label_colorstr, optional

The color of the label.

label_padfloat, optional

The padding between the axis and the label. Typical range is 2 to 12.

line_widthfloat, optional

The width of the spine. Typical range is 0.5 to 3.

font_familystr, optional

The font family to use.

font_sizefloat, optional

The font size to use. Typical range is 8 to 20.

font_weightstr, optional

The font weight to use. Values include "normal", "bold", "light", "ultralight", "heavy", and "black".

use_latexbool, optional

Whether or not to use latex.

hide_spinebool, optional

Whether to hide the spine of the axes. This corresponds to the line that forms the border of the plot.

Returns:
Self

For convenience, the same SmartTwinAxis with the updated visual parameters.

Notes

Color parameters accept Matplotlib color formats: named colors ("blue"), short color strings ("b"), hex strings ("#0000ff"), grayscale strings ("0.5"), and RGB/RGBA tuples with values between 0 and 1 ((0, 0, 1) or (0, 0, 1, 0.5)).