graphinglib.SmartFigureWCS.set_tick_params#
- SmartFigureWCS.set_tick_params(axis: Literal['x', 'y', 'both'] | None = 'both', reset: bool = False, direction: Literal['in', 'out'] | None = None, length: float | None = None, minor_length: float | None = None, width: float | None = None, color: str | None = None, pad: float | None = None, label_size: float | str | None = None, label_color: str | None = None, label_rotation: float | None = None, draw_bottom_ticks: bool | None = None, draw_top_ticks: bool | None = None, draw_left_ticks: bool | None = None, draw_right_ticks: bool | None = None, draw_bottom_labels: bool | None = None, draw_top_labels: bool | None = None, draw_left_labels: bool | None = None, draw_right_labels: bool | None = None) Self[source]#
Sets the tick parameters for the figure. These parameters are given to the
tick_paramsmethod of the astropy.visualization.wcsaxes.WCSAxes.Warning
Due to how the
WCSAxesare implemented, only the length of the minor ticks can be controlled independently from the major ticks. The other parameters are applied to both major and minor ticks for a specified axis.- Parameters:
- axis{“x”, “y”, “both”}, optional
The axis to set the tick parameters for. This method can be called multiple times to set the tick parameters specifically for each axes. Defaults to
"both".- resetbool, optional
If
True, resets all previously given tick parameters to their default values before applying the new parameters. Defaults toFalse.- direction{“in”, “out”}, optional
The direction of the ticks.
Warning
Contrary to the
set_tick_params()method, thedirectionparameter cannot be set to"inout"since they are not supported by astropy.visualization.wcsaxes.WCSAxes.- lengthfloat, optional
The length of the ticks. Typical range is
2to10.- minor_lengthfloat, optional
The length of the minor ticks. This is the only parameter that can be set independently from the major ticks due to the way the
astropy.visualization.wcsaxes.WCSAxesare implemented. Typical range is1to6.- widthfloat, optional
The width of the ticks. Typical range is
0.5to3.- colorstr, optional
The color of the ticks.
- padfloat, optional
The padding to add between the tick labels and the ticks themselves. Typical range is
2to10.- label_sizefloat | str, optional
The font size of the tick labels. This can be a float or a string (e.g. “large”). Typical range is
8to20when a float is used.- label_colorstr, optional
The color of the tick labels.
- label_rotationfloat, optional
The rotation of the tick labels, in degrees.
- draw_bottom_ticks, draw_top_ticks, draw_left_ticks, draw_right_ticksbool, optional
Whether to draw the ticks on the bottom, top, left or right side of the axes respectively.
- draw_bottom_labels, draw_top_labels, draw_left_labels, draw_right_labelsbool, optional
Whether to draw the tick labels on the bottom, top, left or right side of the axes respectively.
- Returns:
- Self
For convenience, the same SmartFigure with the updated tick 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 between0and1((0, 0, 1)or(0, 0, 1, 0.5)).