nested_grid_plotter.add_grid_and_tick_prams_to_axis#
- nested_grid_plotter.add_grid_and_tick_prams_to_axis(ax: Axes, which: Literal['minor', 'major', 'both'] = 'both', direction: Literal['in', 'out', 'inout'] = 'in', length: float = 10, width: float = 1.5, colors: Any = 'k', grid_alpha: float = 1, grid_color: Any = 'grey', grid_linewidth: float = 1.0, grid_linestyle: Any = (0.0, (1, 5)), bottom: bool = True, top: bool = True, left: bool = True, right: bool = True, **kwargs: Any) None[source]#
Add a grid and configure the thick for a given axis.
By default, add a grey grid with inner black ticks on the four edges.
- Parameters:
ax (Axes) – Ax to modify.
which (Literal["minor", "major", "both"], optional) – The group of ticks to which the parameters are applied. The default is “both”.
direction (Literal['in', 'out', 'inout'], optional) – Puts ticks inside the axes, outside the axes, or both. The default is “in”.
length (float, optional) – Tick length in points. The default is 10.
width (float, optional) – Tick width in points. The default is 1.5.
colors (Any, optional) – Tick color and label colors. The default is “k”.
grid_alpha (float, optional) – Transparency of gridlines: 0 (transparent) to 1 (opaque). The default is 0.5.
grid_color (Any, optional) – Gridline color. The default is ‘lightgrey’.
grid_linewidth (float, optional) – Width of gridlines in points. The default is 1.
grid_linestyle (str, optional) – Any valid Line2D line style spec. The default is get_line_style(‘dotted’).
bottom (bool, optional) – Whether to draw the bottom ticks. The default is True.
top (bool, optional) – Whether to draw the top ticks. The default is True.
left (bool, optional) – Whether to draw the left ticks. The default is True.
right (bool, optional) – Whether to draw the right ticks. The default is True.
**kwargs (Any) – Other parameters for matplotlib.axes.Axes.tick_params.
- Return type:
None