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

Skip to content

Commit 8f2b265

Browse files
tacaswellMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #11688: Don't draw axis (spines, ticks, labels) twice when using parasite axes.
1 parent 75ec309 commit 8f2b265

File tree

10 files changed

+11
-25
lines changed

10 files changed

+11
-25
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
axes_grid1 and axisartist Axes no longer draw spines twice
2+
``````````````````````````````````````````````````````````
3+
4+
Previously, spines of `axes_grid1` and `axisartist` Axes would be drawn twice,
5+
leading to a "bold" appearance. This is no longer the case.

doc/users/whats_new.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ revision, see the :ref:`github-stats`.
1515
For a release, add a new section after this, then comment out the include
1616
and toctree below by indenting them. Uncomment them after the release.
1717
18-
.. include:: next_whats_new/README.rst
19-
.. toctree::
20-
:glob:
21-
:maxdepth: 1
18+
.. include:: next_whats_new/README.rst
2219

23-
next_whats_new/*
20+
.. toctree::
21+
:glob:
22+
:maxdepth: 1
23+
24+
next_whats_new/*
2425

2526
Improved default backend selection
2627
----------------------------------

lib/mpl_toolkits/axisartist/axislines.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -659,26 +659,6 @@ def new_floating_axis(self, nth_coord, value, axis_direction="bottom"):
659659
axes=self)
660660
return axis
661661

662-
def draw(self, renderer, inframe=False):
663-
if not self._axisline_on:
664-
super().draw(renderer, inframe)
665-
return
666-
orig_artists = self.artists
667-
self.artists = [
668-
*self.artists, *self._axislines.values(), self.gridlines]
669-
super().draw(renderer, inframe)
670-
self.artists = orig_artists
671-
672-
def get_tightbbox(self, renderer, call_axes_locator=True):
673-
bb0 = super().get_tightbbox(renderer, call_axes_locator)
674-
if not self._axisline_on:
675-
return bb0
676-
bb = [bb0] + [axisline.get_tightbbox(renderer)
677-
for axisline in self._axislines.values()
678-
if axisline.get_visible()]
679-
bbox = Bbox.union([b for b in bb if b and (b.width!=0 or b.height!=0)])
680-
return bbox
681-
682662

683663
Subplot = maxes.subplot_class_factory(Axes)
684664

0 commit comments

Comments
 (0)