8000 Updated polar documentation by dstansby · Pull Request #14261 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Updated polar documentation #14261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions lib/matplotlib/projections/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,16 @@ def get_thetamin(self):
return np.rad2deg(self.viewLim.xmin)

def set_thetalim(self, *args, **kwargs):
"""
Set the minimum and maximum theta values.

Parameters
----------
thetamin : float
Minimum value in degrees.
thetamax : float
Maximum value in degrees.
"""
if 'thetamin' in kwargs:
kwargs['xmin'] = np.deg2rad(kwargs.pop('thetamin'))
if 'thetamax' in kwargs:
Expand Down Expand Up @@ -1100,21 +1110,59 @@ def get_theta_direction(self):
return self._direction.get_matrix()[0, 0]

def set_rmax(self, rmax):
"""
Set the outer radial limit.

Parameters
----------
rmax : float
"""
self.viewLim.y1 = rmax

def get_rmax(self):
"""
Returns
-------
float
Outer radial limit.
"""
return self.viewLim.ymax

def set_rmin(self, rmin):
"""
Set the inner radial limit.

Parameters
----------
rmin : float
"""
self.viewLim.y0 = rmin

def get_rmin(self):
"""
Returns
-------
float
The inner radial limit.
"""
return self.viewLim.ymin

def set_rorigin(self, rorigin):
"""
Update the radial origin.

Parameters
----------
rorigin : float
"""
self._originViewLim.locked_y0 = rorigin

def get_rorigin(self):
"""
Returns
-------
float
"""
return self._originViewLim.y0

def get_rsign(self):
Expand Down
0