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

Skip to content

Commit c9bc9bc

Browse files
committed
FIX: allow secondary axes minor locators to be set
1 parent 146de7f commit c9bc9bc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/axes/_secondary_axes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def __init__(self, parent, orientation,
8282
self._axis = self.yaxis
8383
self._locstrings = ['right', 'left']
8484
self._otherstrings = ['top', 'bottom']
85+
self._parentscale = self._axis.get_scale()
8586
# this gets positioned w/o constrained_layout so exclude:
8687
self._layoutbox = None
8788
self._poslayoutbox = None
@@ -272,6 +273,11 @@ def _set_scale(self):
272273
if self._orientation == 'y':
273274
pscale = self._parent.yaxis.get_scale()
274275
set_scale = self.set_yscale
276+
if pscale == self._parentscale:
277+
return
278+
else:
279+
self._parentscale = pscale
280+
275281
if pscale == 'log':
276282
defscale = 'functionlog'
277283
else:

0 commit comments

Comments
 (0)