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

Skip to content

Commit 93c3138

Browse files
committed
FIX: re-instate ability to have position in axes
1 parent a080696 commit 93c3138

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/pyplot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,11 @@ def axes(arg=None, **kwargs):
10601060
"""
10611061
fig = gcf()
10621062
if arg is None:
1063-
return fig.add_subplot(**kwargs)
1063+
pos = kwargs.pop('position', None)
1064+
if pos is None:
1065+
return fig.add_subplot(**kwargs)
1066+
else:
1067+
return fig.add_axes(pos, **kwargs)
10641068
else:
10651069
return fig.add_axes(arg, **kwargs)
10661070

0 commit comments

Comments
 (0)