Skip to content

Commit

Permalink
Deprecate draw args
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Sep 29, 2023
1 parent e1bc54e commit 54331bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions astropy/visualization/wcsaxes/ticklabels.py
Expand Up @@ -11,6 +11,8 @@

from .frame import RectangularFrame

from astropy.utils.decorators import deprecated_renamed_argument


def sort_using(X, Y):
return [x for (y, x) in sorted(zip(Y, X))]
Expand Down Expand Up @@ -312,6 +314,9 @@ def _set_existing_bboxes(self, bboxes):
self._existing_bboxes = bboxes

@allow_rasterization
@deprecated_renamed_argument(old_name="bboxes", new_name=None, since="6.0")
@deprecated_renamed_argument(old_name="ticklabels_bbox", new_name=None, since="6.0")
@deprecated_renamed_argument(old_name="tick_out_size", new_name=None, since="6.0")
def draw(self, renderer, bboxes=None, ticklabels_bbox=None, tick_out_size=None):
# Reset bounding boxes
self._axis_bboxes = defaultdict(list)
Expand Down
2 changes: 2 additions & 0 deletions docs/changes/visualization/14760.api.rst
@@ -0,0 +1,2 @@
The ``bboxes``, ``ticklabels_bbox``, and ``tick_out_size`` arguments to ``astropy.visualization.wcaxes.ticklabels.TickLabels.draw()`` now have no effect and are deprecated.
This is to allow rasterized ticks to be drawn correctly on WCSAxes.
1 change: 1 addition & 0 deletions docs/changes/visualization/14760.bugfix.rst
@@ -0,0 +1 @@
The location of ticklabels on a WCSAxes is now correctly calculated when the figure is rasterized.

0 comments on commit 54331bd

Please sign in to comment.