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

Skip to content

Commit e771c1b

Browse files
authored
Merge pull request #11688 from anntzer/axislines-draw-twice
FIX: Don't draw axis (spines, ticks, labels) twice when using parasite axes.
2 parents 03b07fb + 929bffb commit e771c1b

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
Ability to scale axis by a fixed order of magnitude
2627
---------------------------------------------------

lib/mpl_toolkits/axisartist/axislines.py

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

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

681661
Subplot = maxes.subplot_class_factory(Axes)
682662

0 commit comments

Comments
 (0)