@@ -860,20 +860,35 @@ def fixlist(args):
860
860
key = fixlist (args ), fixitems (six .iteritems (kwargs ))
861
861
return key
862
862
863
- @docstring .dedent_interpd
864
863
def add_axes (self , * args , ** kwargs ):
865
864
"""
866
865
Add an axes at position *rect* [*left*, *bottom*, *width*,
867
866
*height*] where all quantities are in fractions of figure
868
- width and height. kwargs are legal
869
- :class:`~matplotlib.axes.Axes` kwargs plus *projection* which
870
- sets the projection type of the axes. (For backward
871
- compatibility, ``polar=True`` may also be provided, which is
872
- equivalent to ``projection='polar'``). Valid values for
873
- *projection* are: %(projection_names)s. Some of these
874
- projections support additional kwargs, which may be provided
875
- to :meth:`add_axes`. Typical usage::
867
+ width and height.
868
+
869
+ Parameters
870
+ ----------
871
+ rect : sequence of float
872
+ A 4-length sequence of [left, bottom, width, height] quantities.
873
+
874
+ projection :
875
+ [‘aitoff’ | ‘hammer’ | ‘lambert’ | ‘mollweide’ | \
876
+ ‘polar’ | ‘rectilinear’], optional
877
+ The projection type of the axes.
878
+
879
+ polar : boolean, optional
880
+ If True, equivalent to projection='polar'.
876
881
882
+ This method also takes the keyword arguments for
883
+ :class:`~matplotlib.axes.Axes`.
884
+
885
+ Returns
886
+ ------
887
+ axes : Axes
888
+ The added axes.
889
+
890
+ Examples
891
+ --------
877
892
rect = l,b,w,h
878
893
fig.add_axes(rect)
879
894
fig.add_axes(rect, frameon=False, facecolor='g')
@@ -903,10 +918,6 @@ def add_axes(self, *args, **kwargs):
903
918
904
919
In all cases, the :class:`~matplotlib.axes.Axes` instance
905
920
will be returned.
906
-
907
- In addition to *projection*, the following kwargs are supported:
908
-
909
- %(Axes)s
910
921
"""
911
922
if not len (args ):
912
923
return
@@ -949,11 +960,41 @@ def add_axes(self, *args, **kwargs):
949
960
a .stale_callback = _stale_figure_callback
950
961
return a
951
962
952
- @docstring .dedent_interpd
953
963
def add_subplot (self , * args , ** kwargs ):
954
964
"""
955
- Add a subplot. Examples::
965
+ Add a subplot.
966
+
967
+ Parameters
968
+ ----------
969
+ *args
970
+ Either a 3-digit integer or three separate integers
971
+ describing the position of the subplot. If the three
972
+ integers are I, J, and K, the subplot is the Ith plot on a
973
+ grid with J rows and K columns.
974
+
975
+ projection : [‘aitoff’ | ‘hammer’ | ‘lambert’ | \
976
+ ‘mollweide’, ‘polar’ | ‘rectilinear’], optional
977
+ The projection type of the axes.
978
+
979
+ polar : boolean, optional
980
+ If True, equivalent to projection='polar'.
956
981
982
+ This method also takes the keyword arguments for
983
+ :class:`~matplotlib.axes.Axes`.
984
+
985
+ Returns
986
+ -------
987
+ axes : Axes
988
+ The axes of the subplot.
989
+
990
+ Notes
991
+ -----
992
+ If the figure already has a subplot with key (*args*,
993
+ *kwargs*) then it will simply make that subplot current and
994
+ return it.
995
+
996
+ Examples
997
+ --------
957
998
fig.add_subplot(111)
958
999
959
1000
# equivalent but more general
@@ -968,27 +1009,9 @@ def add_subplot(self, *args, **kwargs):
968
1009
# add Subplot instance sub
969
1010
fig.add_subplot(sub)
970
1011
971
- *kwargs* are legal :class:`~matplotlib.axes.Axes` kwargs plus
972
- *projection*, which chooses a projection type for the axes.
973
- (For backward compatibility, *polar=True* may also be
974
- provided, which is equivalent to *projection='polar'*). Valid
975
- values for *projection* are: %(projection_names)s. Some of
976
- these projections
977
- support additional *kwargs*, which may be provided to
978
- :meth:`add_axes`.
979
-
980
- The :class:`~matplotlib.axes.Axes` instance will be returned.
981
-
982
- If the figure already has a subplot with key (*args*,
983
- *kwargs*) then it will simply make that subplot current and
984
- return it.
985
-
986
- .. seealso:: :meth:`~matplotlib.pyplot.subplot` for an
987
- explanation of the args.
988
-
989
- The following kwargs are supported:
990
-
991
- %(Axes)s
1012
+ See Also
1013
+ --------
1014
+ matplotlib.pyplot.subplot : for an explanation of the args.
992
1015
"""
993
1016
if not len (args ):
994
1017
return
0 commit comments