1
- ``plt.subplot `` re-selection without kwargs
1
+ ``plt.subplot `` re-selection without keyword arguments
2
2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
3
4
4
The purpose of `pyplot.subplot ` is to facilitate creating and
@@ -10,14 +10,14 @@ additional keyword arguments through to the Axes-subclass that is created.
10
10
The first time `pyplot.subplot ` is called for a given position in the
11
11
Axes grid it is clear that the correct behavior is to create and
12
12
return an Axes at the given position with the passed arguments
13
- (defaulting to a rectilinear Axes). However, on n subsequent calls to
13
+ (defaulting to a rectilinear Axes). However, on subsequent calls to
14
14
`pyplot.subplot ` the correct behavior is more subtle. If an Axes exists
15
- at the requested location and has equivalent parameters the existing axes
15
+ at the requested location and has equivalent parameters the existing Axes
16
16
should be returned, but if the parameters are different the old Axes is removed
17
17
from the Figure and a new Axes is created and returned.
18
18
19
19
Due to an implementation detail, it was previously the case that for all
20
- Axes subclass, except for Axes3D, the axes would be deemed equivalent even
20
+ Axes subclass, except for Axes3D, the Axes would be deemed equivalent even
21
21
if the projections were different. Thus ::
22
22
23
23
ax1 = plt.subplot(1, 1, 1, projection='polar')
@@ -28,7 +28,7 @@ arguments are passed to `pyplot.subplot` and there is an existing Axes
28
28
at the grid position, the existing Axes is returned without consideration
29
29
of the keywords used to create the Axes.
30
30
31
- Due to the previous implementation, if there was an existing Axes what
31
+ Due to the previous implementation, if there was an existing Axes that
32
32
was not rectilinear, passing ::
33
33
34
34
plt.subplot(projection='rectilinear')
@@ -43,7 +43,7 @@ there is a change in behavior for ::
43
43
44
44
plt.subplot(projection='3d') # create a 3D Axes
45
45
46
- plt.subplot() # now returns existing 3D Axes
46
+ plt.subplot() # now returns existing 3D Axes, but
47
47
# previously created new 2D Axes
48
48
49
49
plt.subplot(projection='rectilinear') # to get a new 2D Axes
0 commit comments