MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / thetagrids

Function thetagrids

site-packages/matplotlib/pyplot.py:1708–1772  ·  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

(*args, **kwargs)

Source from the content-addressed store, hash-verified

1706
1707
1708def thetagrids(*args, **kwargs):
1709 """
1710 Get or set the theta gridlines on the current polar plot.
1711
1712 Call signatures::
1713
1714 lines, labels = thetagrids()
1715 lines, labels = thetagrids(angles, labels=None, fmt=None, **kwargs)
1716
1717 When called with no arguments, `.thetagrids` simply returns the tuple
1718 (*lines*, *labels*). When called with arguments, the labels will
1719 appear at the specified angles.
1720
1721 Parameters
1722 ----------
1723 angles : tuple with floats, degrees
1724 The angles of the theta gridlines.
1725
1726 labels : tuple with strings or None
1727 The labels to use at each radial gridline. The
1728 `.projections.polar.ThetaFormatter` will be used if None.
1729
1730 fmt : str or None
1731 Format string used in `matplotlib.ticker.FormatStrFormatter`.
1732 For example '%f'. Note that the angle in radians will be used.
1733
1734 Returns
1735 -------
1736 lines, labels : list of `.lines.Line2D`, list of `.text.Text`
1737 *lines* are the theta gridlines and *labels* are the tick labels.
1738
1739 Other Parameters
1740 ----------------
1741 **kwargs
1742 *kwargs* are optional `~.Text` properties for the labels.
1743
1744 Examples
1745 --------
1746 ::
1747
1748 # set the locations of the angular gridlines
1749 lines, labels = thetagrids( range(45,360,90) )
1750
1751 # set the locations and labels of the angular gridlines
1752 lines, labels = thetagrids( range(45,360,90), ('NE', 'NW', 'SW','SE') )
1753
1754 See Also
1755 --------
1756 .pyplot.rgrids
1757 .projections.polar.PolarAxes.set_thetagrids
1758 .Axis.get_gridlines
1759 .Axis.get_ticklabels
1760 """
1761 ax = gca()
1762 if not isinstance(ax, PolarAxes):
1763 raise RuntimeError('thetagrids only defined for polar axes')
1764 if len(args)==0:
1765 lines = ax.xaxis.get_ticklines()

Callers

nothing calls this directly

Calls 5

silent_listClass · 0.90
gcaFunction · 0.85
get_ticklinesMethod · 0.80
get_ticklabelsMethod · 0.80
set_thetagridsMethod · 0.80

Tested by

no test coverage detected