@@ -1056,12 +1056,10 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
1056
1056
Controls sharing of properties among x (`sharex`) or y (`sharey`)
1057
1057
axes:
1058
1058
1059
- - True or 'all': x- or y-axis will be shared among all
1060
- subplots.
1061
- - False or 'none': each subplot x- or y-axis will be
1062
- independent.
1063
- - 'row': each subplot row will share an x- or y-axis.
1064
- - 'col': each subplot column will share an x- or y-axis.
1059
+ - True or 'all': x- or y-axis will be shared among all subplots.
1060
+ - False or 'none': each subplot x- or y-axis will be independent.
1061
+ - 'row': each subplot row will share an x- or y-axis.
1062
+ - 'col': each subplot column will share an x- or y-axis.
1065
1063
1066
1064
When subplots have a shared x-axis along a column, only the x tick
1067
1065
labels of the bottom subplot are created. Similarly, when subplots
@@ -1073,11 +1071,11 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
1073
1071
- If True, extra dimensions are squeezed out from the returned
1074
1072
array of `~matplotlib.axes.Axes`:
1075
1073
1076
- - if only one subplot is constructed (nrows=ncols=1), the
1077
- resulting single Axes object is returned as a scalar.
1078
- - for Nx1 or 1xM subplots, the returned object is a 1D numpy
1079
- object array of Axes objects.
1080
- - for NxM, subplots with N>1 and M>1 are returned as a 2D array.
1074
+ - if only one subplot is constructed (nrows=ncols=1), the
1075
+ resulting single Axes object is returned as a scalar.
1076
+ - for Nx1 or 1xM subplots, the returned object is a 1D numpy
1077
+ object array of Axes objects.
1078
+ - for NxM, subplots with N>1 and M>1 are returned as a 2D array.
1081
1079
1082
1080
- If False, no squeezing at all is done: the returned Axes object is
1083
1081
always a 2D array containing Axes instances, even if it ends up
@@ -1133,18 +1131,18 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
1133
1131
x = np.linspace(0, 2*np.pi, 400)
1134
1132
y = np.sin(x**2)
1135
1133
1136
- # Creates just a figure and only one subplot
1134
+ # Create just a figure and only one subplot
1137
1135
fig, ax = plt.subplots()
1138
1136
ax.plot(x, y)
1139
1137
ax.set_title('Simple plot')
1140
1138
1141
- # Creates two subplots and unpacks the output array immediately
1139
+ # Create two subplots and unpack the output array immediately
1142
1140
f, (ax1, ax2) = plt.subplots(1, 2, sharey=True)
1143
1141
ax1.plot(x, y)
1144
1142
ax1.set_title('Sharing Y axis')
1145
1143
ax2.scatter(x, y)
1146
1144
1147
- # Creates four polar axes, and accesses them through the returned array
1145
+ # Create four polar axes and access them through the returned array
1148
1146
fig, axs = plt.subplots(2, 2, subplot_kw=dict(polar=True))
1149
1147
axs[0, 0].plot(x, y)
1150
1148
axs[1, 1].scatter(x, y)
@@ -1161,7 +1159,7 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
1161
1159
# Note that this is the same as
1162
1160
plt.subplots(2, 2, sharex=True, sharey=True)
1163
1161
1164
- # Creates figure number 10 with a single subplot
1162
+ # Create figure number 10 with a single subplot
1165
1163
# and clears it if it already exists.
1166
1164
fig, ax = plt.subplots(num=10, clear=True)
1167
1165
0 commit comments