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

Function thetagrids

lib/matplotlib/pyplot.py:2564–2637  ·  view source on GitHub ↗

Get or set the theta gridlines on the current polar plot. Call signatures:: lines, labels = thetagrids() lines, labels = thetagrids(angles, labels=None, fmt=None, **kwargs) When called with no arguments, `.thetagrids` simply returns the tuple (*lines*, *labels*). When c

(
    angles: ArrayLike | None = None,
    labels: Sequence[str | Text] | None = None,
    fmt: str | None = None,
    **kwargs
)

Source from the content-addressed store, hash-verified

2562
2563
2564def thetagrids(
2565 angles: ArrayLike | None = None,
2566 labels: Sequence[str | Text] | None = None,
2567 fmt: str | None = None,
2568 **kwargs
2569) -> tuple[list[Line2D], list[Text]]:
2570 """
2571 Get or set the theta gridlines on the current polar plot.
2572
2573 Call signatures::
2574
2575 lines, labels = thetagrids()
2576 lines, labels = thetagrids(angles, labels=None, fmt=None, **kwargs)
2577
2578 When called with no arguments, `.thetagrids` simply returns the tuple
2579 (*lines*, *labels*). When called with arguments, the labels will
2580 appear at the specified angles.
2581
2582 Parameters
2583 ----------
2584 angles : tuple with floats, degrees
2585 The angles of the theta gridlines.
2586
2587 labels : tuple with strings or None
2588 The labels to use at each radial gridline. The
2589 `.projections.polar.ThetaFormatter` will be used if None.
2590
2591 fmt : str or None
2592 Format string used in `matplotlib.ticker.FormatStrFormatter`.
2593 For example '%f'. Note that the angle in radians will be used.
2594
2595 Returns
2596 -------
2597 lines : list of `.lines.Line2D`
2598 The theta gridlines.
2599
2600 labels : list of `.text.Text`
2601 The tick labels.
2602
2603 Other Parameters
2604 ----------------
2605 **kwargs
2606 *kwargs* are optional `.Text` properties for the labels.
2607
2608 See Also
2609 --------
2610 .pyplot.rgrids
2611 .projections.polar.PolarAxes.set_thetagrids
2612 .Axis.get_gridlines
2613 .Axis.get_ticklabels
2614
2615 Examples
2616 --------
2617 ::
2618
2619 # set the locations of the angular gridlines
2620 lines, labels = thetagrids(range(45, 360, 90))
2621

Callers

nothing calls this directly

Calls 4

gcaFunction · 0.85
get_ticklinesMethod · 0.80
get_ticklabelsMethod · 0.80
set_thetagridsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…