From 40b5dd4ff4740b0b5a804b30560c0a614fc81cfe Mon Sep 17 00:00:00 2001 From: Mees Fix Date: Thu, 8 Feb 2024 12:57:54 -0500 Subject: [PATCH] Removing transform kw from ax.fill for Hubble apertures --- pysiaf/aperture.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pysiaf/aperture.py b/pysiaf/aperture.py index 941f3932..fc3fdcbe 100644 --- a/pysiaf/aperture.py +++ b/pysiaf/aperture.py @@ -685,10 +685,12 @@ def plot(self, frame='tel', label=False, ax=None, title=False, units='arcsec', horizontalalignment='center', rotation=label_rotation, color=ax.lines[-1].get_color()) if fill: - # If a transform kwarg is supplied, pass it through to the fill function too - transform_kw = kwargs.get('transform', None) - ax.fill(x2 * scale, y2 * scale, color=fill_color, zorder=-40, alpha=fill_alpha, transform=transform_kw) - + if self.observatory == "JWST": + # If a transform kwarg is supplied, pass it through to the fill function too + transform_kw = kwargs.get('transform', None) + ax.fill(x2 * scale, y2 * scale, color=fill_color, zorder=-40, alpha=fill_alpha, transform=transform_kw) + elif self.observatory == "HST": + ax.fill(x2 * scale, y2 * scale, color=fill_color, zorder=-40, alpha=fill_alpha) if title: ax.set_title("{0} frame".format(frame)) if show_frame_origin: