Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d9a8a3

Browse files
authored
Merge pull request #16481 from dstansby/thetalim-doc
Update set_thetalim documentation
2 parents ec153a5 + 592df36 commit 1d9a8a3

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

lib/matplotlib/projections/polar.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -975,15 +975,19 @@ def get_thetamin(self):
975975
return np.rad2deg(self.viewLim.xmin)
976976

977977
def set_thetalim(self, *args, **kwargs):
978-
"""
978+
r"""
979979
Set the minimum and maximum theta values.
980980
981-
Parameters
982-
----------
983-
thetamin : float
984-
Minimum value in degrees.
985-
thetamax : float
986-
Maximum value in degrees.
981+
Can take the following signatures:
982+
983+
- ``set_thetalim(minval, maxval)``: Set the limits in radians.
984+
- ``set_thetalim(thetamin=minval, thetamax=maxval)``: Set the limits
985+
in degrees.
986+
987+
where minval and maxval are the minimum and maximum limits. Values are
988+
wrapped in to the range :math:`[0, 2\pi]` (in radians), so for example
989+
it is possible to do ``set_thetalim(-np.pi / 2, np.pi / 2)`` to have
990+
an axes symmetric around 0.
987991
"""
988992
if 'thetamin' in kwargs:
989993
kwargs['xmin'] = np.deg2rad(kwargs.pop('thetamin'))

0 commit comments

Comments
 (0)