On this page
mpl_toolkits.axisartist.axis_artist.GridlinesCollection
- classmpl_toolkits.axisartist.axis_artist.GridlinesCollection(*args, which='major', axis='both', **kwargs)[source]
-
Bases:
LineCollectionCollection of grid lines.
- Parameters:
-
- which{"major", "minor"}
-
Which grid to consider.
- axis{"both", "x", "y"}
-
Which axis to consider.
- *args, **kwargs
-
Passed to
LineCollection.
- draw(renderer)[source]
-
Draw the Artist (and its children) using the given renderer.
This has no effect if the artist is not visible (
Artist.get_visiblereturns False).- Parameters:
-
- renderer
RendererBasesubclass.
- renderer
Notes
This method is overridden in the Artist subclasses.
- set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, axis=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, colors=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, grid_helper=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, segments=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, verts=<UNSET>, visible=<UNSET>, which=<UNSET>, zorder=<UNSET>)[source]
-
Set multiple properties at once.
Supported properties are
Property
Description
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
array-like or scalar or None
bool
antialiasedor aa or antialiasedsbool or list of bools
array-like or None
{"both", "x", "y"}
CapStyleor {'butt', 'projecting', 'round'}(vmin: float, vmax: float)
bool
Patch or (Path, Transform) or None
Colormapor str or Nonecolor or list of colors
color or list of colors
edgecoloror ec or edgecolorscolor or list of colors or 'face'
facecoloror facecolors or fccolor or list of colors
str
GridHelperBasesubclass{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
bool
JoinStyleor {'miter', 'round', 'bevel'}object
linestyleor dashes or linestyles or lsstr or tuple or list thereof
linewidthor linewidths or lwfloat or list of floats
bool
Normalizeor str or Noneoffset_transformor transOffsetunknown
(N, 2) or (2,) array-like
unknown
None or bool or float or callable
unknown
bool
unknown
(scale: float, length: float, randomness: float)
bool or None
str
list of str or None
unknown
bool
{"major", "minor"}
float
- set_axis(axis)[source]
-
Select axis.
- Parameters:
-
- axis{"both", "x", "y"}
- set_grid_helper(grid_helper)[source]
-
Set grid helper.
- Parameters:
-
- grid_helper
GridHelperBasesubclass
- grid_helper
- set_which(which)[source]
-
Select major or minor grid lines.
- Parameters:
-
- which{"major", "minor"}
© 2012–2023 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/stable/api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection.html