8000 Update `WCSAxes` to pass multiple positional arguments to `Axes` by ConorMacBride · Pull Request #13880 · astropy/astropy · GitHub
[go: up one dir, main page]

Skip to content

Update WCSAxes to pass multiple positional arguments to Axes #13880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions astropy/visualization/wcsaxes/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,17 @@ class WCSAxes(Axes):
----------
fig : `~matplotlib.figure.Figure`
The figure to add the axes to
rect : list
The position of the axes in the figure in relative units. Should be
given as ``[left, bottom, width, height]``.
*args
``*args`` can be a single ``(left, bottom, width, height)``
rectangle or a single `matplotlib.transforms.Bbox`. This specifies
the rectangle (in figure coordinates) where the Axes is positioned.
``*args`` can also consist of three numbers or a single three-digit
number; in the latter case, the digits are considered as
independent numbers. The numbers are interpreted as ``(nrows,
ncols, index)``: ``(nrows, ncols)`` specifies the size of an array
of subplots, and ``index`` is the 1-based index of the subplot
being created. Finally, ``*args`` can also directly be a
`matplotlib.gridspec.SubplotSpec` instance.
wcs : :class:`~astropy.wcs.WCS`, optional
The WCS for the data. If this is specified, ``transform`` cannot be
specified.
Expand Down Expand Up @@ -94,13 +102,13 @@ class WCSAxes(Axes):
:class:`~astropy.visualization.wcsaxes.frame.RectangularFrame`
"""

def __init__(self, fig, rect, wcs=None, transform=None, coord_meta=None,
def __init__(self, fig, *args, wcs=None, transform=None, coord_meta=None,
transData=None, slices=None, frame_class=None,
**kwargs):
"""
"""

super().__init__(fig, rect, **kwargs)
super().__init__(fig, *args, **kwargs)
self._bboxes = []

if frame_class is not None:
Expand Down
0