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

Skip to content

Commit 170710d

Browse files
committed
Revert "Merge pull request #8539 from Tuan333/tuan"
This reverts commit 3e2e31e, reversing changes made to 8149536. This has some un-intended consequences (see #9261). This exposes a bigger issue about drawing on to non-linear axes which is if we transform only the vertices or the full paths. Which the user wants is dependent on context so we need to expose this at the user API in a nice way, but is a bigger change than we can accommodate for 2.1. Reverting this change to return to the (slightly) broken state which has been the satus-quo 7 years.
1 parent 72b75c9 commit 170710d

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,9 +1832,6 @@ def add_patch(self, p):
18321832
if p.get_clip_path() is None:
18331833
p.set_clip_path(self.patch)
18341834
self._update_patch_limits(p)
1835-
if self.name != 'rectilinear':
1836-
path = p.get_path()
1837-
path._interpolation_steps = max(path._interpolation_steps, 100)
18381835
self.patches.append(p)
18391836
p._remove_method = lambda h: self.patches.remove(h)
18401837
return p
Binary file not shown.

lib/matplotlib/tests/test_patches.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -339,21 +339,6 @@ def test_multi_color_hatch():
339339
ax.add_patch(r)
340340

341341

342-
@image_comparison(baseline_images=['polar_proj'], extensions=['png'],
343-
style='default')
344-
def test_adding_rectangle_patch_with_polar_projection():
345-
fig = plt.figure()
346-
ax = fig.add_subplot(111, projection='polar')
347-
348-
# add quadrant as example
349-
ax.add_patch(
350-
mpatches.Rectangle(
351-
(0, 1), width=np.pi * 0.5, height=0.5
352-
)
353-
)
354-
ax.set_rmax(2)
355-
356-
357342
@image_comparison(baseline_images=['units_rectangle'], extensions=['png'])
358343
def test_units_rectangle():
359344
import matplotlib.testing.jpl_units as U

0 commit comments

Comments
 (0)