Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5c28e95

Browse filesBrowse files
committed
do not fail on _DummyAxes
1 parent f04bff0 commit 5c28e95
Copy full SHA for 5c28e95

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎lib/matplotlib/ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/ticker.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,11 @@ def set_locs(self, locs):
846846
vmin, vmax = self.axis.get_view_interval()
847847
self.d = abs(vmax - vmin)
848848

849-
if hasattr(self.axis.get_transform(), 'linthresh'):
849+
if not hasattr(self.axis, 'get_transform'):
850+
# This might be a colorbar dummy axis, do not attempt to get
851+
# transform
852+
numdec = 10
853+
elif hasattr(self.axis.get_transform(), 'linthresh'):
850854
t = self.axis.get_transform()
851855
linthresh = t.linthresh
852856
# Only compute the number of decades in the logarithmic part of the

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.