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

Skip to content

Commit 7ab92de

Browse files
committed
Prevent error when using dummy axis
1 parent 471e668 commit 7ab92de

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/ticker.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,10 +1003,11 @@ def _symlog(self):
10031003
linthresh=self._linthresh,
10041004
linscale=self._linscale)
10051005
return True
1006-
transf = self.axis.get_transform()
1007-
if hasattr(transf, 'linthresh'):
1008-
self._symlogutil = _SymmetricalLogUtil(transf)
1006+
try:
1007+
self._symlogutil = _SymmetricalLogUtil(self.axis.get_transform())
10091008
return True
1009+
except AttributeError:
1010+
pass
10101011
return False
10111012

10121013
def set_locs(self, locs=None):

0 commit comments

Comments
 (0)