MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_rgrids

Method set_rgrids

lib/matplotlib/projections/polar.py:1318–1382  ·  view source on GitHub ↗

Set the radial gridlines on a polar plot. 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.t

(self, radii, labels=None, angle=None, fmt=None, **kwargs)

Source from the content-addressed store, hash-verified

1316 return self.xaxis.get_ticklines(), self.xaxis.get_ticklabels()
1317
1318 def set_rgrids(self, radii, labels=None, angle=None, fmt=None, **kwargs):
1319 """
1320 Set the radial gridlines on a polar plot.
1321
1322 Parameters
1323 ----------
1324 radii : tuple with floats
1325 The radii for the radial gridlines
1326
1327 labels : tuple with strings or None
1328 The labels to use at each radial gridline. The
1329 `matplotlib.ticker.ScalarFormatter` will be used if None.
1330
1331 angle : float
1332 The angular position of the radius labels in degrees.
1333
1334 fmt : str or None
1335 Format string used in `matplotlib.ticker.FormatStrFormatter`.
1336 For example '%f'.
1337
1338 Returns
1339 -------
1340 lines : list of `.lines.Line2D`
1341 The radial gridlines.
1342
1343 labels : list of `.text.Text`
1344 The tick labels.
1345
1346 Other Parameters
1347 ----------------
1348 **kwargs
1349 *kwargs* are optional `.Text` properties for the labels.
1350
1351 .. warning::
1352
1353 This only sets the properties of the current ticks.
1354 Ticks are not guaranteed to be persistent. Various operations
1355 can create, delete and modify the Tick instances. There is an
1356 imminent risk that these settings can get lost if you work on
1357 the figure further (including also panning/zooming on a
1358 displayed figure).
1359
1360 Use `.set_tick_params` instead if possible.
1361
1362 See Also
1363 --------
1364 .PolarAxes.set_thetagrids
1365 .Axis.get_gridlines
1366 .Axis.get_ticklabels
1367 """
1368 # Make sure we take into account unitized data
1369 radii = self.convert_xunits(radii)
1370 radii = np.asarray(radii)
1371
1372 self.set_yticks(radii)
1373 if labels is not None:
1374 self.set_yticklabels(labels)
1375 elif fmt is not None:

Callers 4

rgridsFunction · 0.80
test_polar_alignmentFunction · 0.80
radar_chart.pyFile · 0.80

Calls 8

get_rlabel_positionMethod · 0.95
set_rlabel_positionMethod · 0.95
convert_xunitsMethod · 0.80
set_yticksMethod · 0.80
get_ticklabelsMethod · 0.80
_internal_updateMethod · 0.80
set_major_formatterMethod · 0.45
get_gridlinesMethod · 0.45

Tested by 2

test_polar_alignmentFunction · 0.64