diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index e68ed2515239..7716eff37a9a 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -799,7 +799,9 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True, ret = fig, axarr[0,0] else: ret = fig, axarr.squeeze() - + else: + # returned axis array will be always 2-d, even if nrows=ncols=1 + ret = fig, axarr.reshape(nrows, ncols) return ret