On this page
matplotlib.pyplot.rgrids
matplotlib.pyplot.rgrids(*args, **kwargs)[source]-
Get or set the radial gridlines on the current polar plot.
Call signatures:
lines, labels = rgrids() lines, labels = rgrids(radii, labels=None, angle=22.5, fmt=None, **kwargs)When called with no arguments,
rgridssimply returns the tuple (lines, labels). When called with arguments, the labels will appear at the specified radial distances and angle.Parameters: -
radii : tuple with floats -
The radii for the radial gridlines
-
labels : tuple with strings or None -
The labels to use at each radial gridline. The
matplotlib.ticker.ScalarFormatterwill be used if None. -
angle : float -
The angular position of the radius labels in degrees.
-
fmt : str or None -
Format string used in
matplotlib.ticker.FormatStrFormatter. For example '%f'.
Returns: -
lines, labels : list of lines.Line2D, list of text.Text -
lines are the radial gridlines and labels are the tick labels.
Other Parameters: - **kwargs
-
kwargs are optional
Textproperties for the labels.
See also
pyplot.thetagrids,projections.polar.PolarAxes.set_rgrids,Axis.get_gridlines,Axis.get_ticklabelsExamples
# set the locations of the radial gridlines lines, labels = rgrids( (0.25, 0.5, 1.0) ) # set the locations and labels of the radial gridlines lines, labels = rgrids( (0.25, 0.5, 1.0), ('Tom', 'Dick', 'Harry' )) -
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.0.0/api/_as_gen/matplotlib.pyplot.rgrids.html