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 2ee3e6d

Browse filesBrowse files
committed
FIX: re-add AssertionError check
1 parent 8104b16 commit 2ee3e6d
Copy full SHA for 2ee3e6d

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
@@ -1045,7 +1045,13 @@ def _update_ticks(self, renderer):
10451045
tick.update_position(loc)
10461046
tick.set_label1(label)
10471047
tick.set_label2(label)
1048-
loct = self.get_transform().transform(loc)
1048+
try:
1049+
loct = self.get_transform().transform(loc)
1050+
except AssertionError:
1051+
# transforms.transform doesn't allow masked values but
1052+
# some scales might make them, so we need this try/except.
1053+
loct = None
1054+
continue
10491055
if not mtransforms.interval_contains_close(inter, loct):
10501056
continue
10511057
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.