8000 Use consistent array shape when setting square axis. · matplotlib/matplotlib@df61898 · GitHub
[go: up one dir, main page]

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 df61898

Browse files
committed
Use consistent array shape when setting square axis.
NumPy 1.18.x will not like setting an array slice with a ragged array like this.
1 parent 5e
8000
5f7bc commit df61898

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ def axis(self, *args, emit=True, **kwargs):
16451645
self.set_autoscale_on(False)
16461646
xlim = self.get_xlim()
16471647
ylim = self.get_ylim()
1648-
edge_size = max(np.diff(xlim), np.diff(ylim))
1648+
edge_size = max(np.diff(xlim), np.diff(ylim))[0]
16491649
self.set_xlim([xlim[0], xlim[0] + edge_size],
16501650
emit=emit, auto=False)
16511651
self.set_ylim([ylim[0], ylim[0] + edge_size],

0 commit comments

Comments
 (0)
0