Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23ac081

Browse files
committed
Make return in pyplot.subplot clearer
1 parent 551d35c commit 23ac081

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,7 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
801801
ret = fig, axarr.squeeze()
802802
else:
803803
# returned axis array will be always 2-d, even if nrows=ncols=1
804-
return fig, axarr.reshape(nrows, ncols)
805-
804+
ret = fig, axarr.reshape(nrows, ncols)
806805

807806
return ret
808807

0 commit comments

Comments
 (0)