Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9b09708

Browse filesBrowse files
committed
Merge pull request #1603 from mdboom/polar_range
ylim=0.0 is not well handled in polar plots
2 parents 422712d + eb8fa7b commit 9b09708
Copy full SHA for 9b09708

File tree

Expand file treeCollapse file tree

1 file changed

+4
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-9
lines changed

‎lib/matplotlib/projections/polar.py

Copy file name to clipboardExpand all lines: lib/matplotlib/projections/polar.py
+4-9Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,10 @@ def transform_non_affine(self, tr):
5757
t *= theta_direction
5858
t += theta_offset
5959

60-
if rmin != 0:
61-
r = r - rmin
62-
mask = r < 0
63-
x[:] = np.where(mask, np.nan, r * np.cos(t))
64-
y[:] = np.where(mask, np.nan, r * np.sin(t))
65-
else:
66-
x[:] = r * np.cos(t)
67-
y[:] = r * np.sin(t)
60+
r = r - rmin
61+
mask = r < 0
62+
x[:] = np.where(mask, np.nan, r * np.cos(t))
63+
y[:] = np.where(mask, np.nan, r * np.sin(t))
6864

6965
return xy
7066
transform_non_affine.__doc__ = Transform.transform_non_affine.__doc__
@@ -779,4 +775,3 @@ def drag_pan(self, button, key, x, y):
779775
# result = self.transform(result)
780776
# return mpath.Path(result, codes)
781777
# transform_path_non_affine = transform_path
782-

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.