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 90e97af

Browse filesBrowse files
committed
Fix typo in set_adjustable check.
The intent of the getattr was to handle cases where ax.get_data_ratio has been patched to something that's not a method and therefore has no `__func__`.
1 parent 0851204 commit 90e97af
Copy full SHA for 90e97af

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-1
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ def set_adjustable(self, adjustable, share=False):
13221322
else:
13231323
axs = [self]
13241324
if (adjustable == "datalim"
1325-
and any(getattr(ax.get_data_ratio, "__func__")
1325+
and any(getattr(ax.get_data_ratio, "__func__", None)
13261326
!= _AxesBase.get_data_ratio
13271327
for ax in axs)):
13281328
# Limits adjustment by apply_aspect assumes that the axes' aspect

0 commit comments

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