@@ -55,9 +55,17 @@ class WCSAxes(Axes):
55
55
----------
56
56
fig : `~matplotlib.figure.Figure`
57
57
The figure to add the axes to
58
- rect : list
59
- The position of the axes in the figure in relative units. Should be
60
- given as ``[left, bottom, width, height]``.
58
+ *args
59
+ ``*args`` can be a single ``(left, bottom, width, height)``
60
+ rectangle or a single `matplotlib.transforms.Bbox`. This specifies
61
+ the rectangle (in figure coordinates) where the Axes is positioned.
62
+ ``*args`` can also consist of three numbers or a single three-digit
63
+ number; in the latter case, the digits are considered as
64
+ independent numbers. The numbers are interpreted as ``(nrows,
65
+ ncols, index)``: ``(nrows, ncols)`` specifies the size of an array
66
+ of subplots, and ``index`` is the 1-based index of the subplot
67
+ being created. Finally, ``*args`` can also directly be a
68
+ `matplotlib.gridspec.SubplotSpec` instance.
61
69
wcs : :class:`~astropy.wcs.WCS`, optional
62
70
The WCS for the data. If this is specified, ``transform`` cannot be
63
71
specified.
@@ -96,13 +104,13 @@ class WCSAxes(Axes):
96
104
:class:`~astropy.visualization.wcsaxes.frame.RectangularFrame`
97
105
"""
98
106
99
- def __init__ (self , fig , rect , wcs = None , transform = None , coord_meta = None ,
107
+ def __init__ (self , fig , * args , wcs = None , transform = None , coord_meta = None ,
100
108
transData = None , slices = None , frame_class = None ,
101
109
** kwargs ):
102
110
"""
103
111
"""
104
112
105
- super ().__init__ (fig , rect , ** kwargs )
113
+ super ().__init__ (fig , * args , ** kwargs )
106
114
self ._bboxes = []
107
115
108
116
if frame_class is not None :
0 commit comments