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 3d4976b

Browse filesBrowse files
committed
FIX: re-add AssertionError check
1 parent f568751 commit 3d4976b
Copy full SHA for 3d4976b

File tree

Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed

‎lib/matplotlib/axis.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axis.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,13 @@ def _update_ticks(self, renderer):
10921092
tick.update_position(loc)
10931093
tick.set_label1(label)
10941094
tick.set_label2(label)
1095-
loct = self.get_transform().transform(loc)
1095+
try:
1096+
loct = self.get_transform().transform(loc)
1097+
except AssertionError:
1098+
# transforms.transform doesn't allow masked values but
1099+
# some scales might make them, so we need this try/except.
1100+
loct = None
1101+
continue
10961102
if not mtransforms.interval_contains_close(inter, loct):
10971103
continue
10981104
ticks_to_draw.append(tick)

‎lib/matplotlib/transforms.py

Copy file name to clipboardExpand all lines: lib/matplotlib/transforms.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2917,7 +2917,7 @@ def interval_contains(interval, val):
29172917
def interval_contains_close(interval, val, rtol=1e-10):
29182918
"""
29192919
Check, inclusively, whether an interval includes a given value, with the
2920-
interval expanded by a small tolerance to admit floating point errors.
2920+
interval expanded by a small tolerance to admit floating point errors.
29212921
29222922
Parameters
29232923
----------

0 commit comments

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