You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classEllipticalFrame(BaseFrame):
""" An elliptical frame. """spine_names="chv"defupdate_spines(self):
xmin, xmax=self.parent_axes.get_xlim()
ymin, ymax=self.parent_axes.get_ylim()
xmid=0.5* (xmax+xmin)
ymid=0.5* (ymax+ymin)
dx=xmid-xmindy=ymid-ymintheta=np.linspace(0.0, 2*np.pi, 1000)
self["c"].data=np.array(
[xmid+dx*np.cos(theta), ymid+dy*np.sin(theta)]
).transpose()
self["h"].data=np.array(
[np.linspace(xmin, xmax, 1000), np.repeat(ymid, 1000)]
).transpose()
self["v"].data=np.array(
[np.repeat(xmid, 1000), np.linspace(ymin, ymax, 1000)]
).transpose()
super().update_spines()
def_update_patch_path(self):
"""Override path patch to include only the outer ellipse, not the major and minor axes in the middle. """self.update_spines()
vertices=self["c"].dataifself._pathisNone:
self._path=Path(vertices)
else:
self._path.vertices=verticesdefdraw(self, renderer):
"""Override to draw only the outer ellipse, not the major and minor axes in the middle. FIXME: we may want to add a general method to give the user control over which spines are drawn. """axis="c"pixel=self[axis]._get_pixel()
line=Line2D(
pixel[:, 0],
pixel[:, 1],
linewidth=self._linewidth,
color=self._color,
zorder=1000,
)
line.draw(renderer)
In all-sky plots, we draw a rectangular frame instead of an elliptical one, see MNWE:
However this is not as trivial as enforcing Elliptical Frame, see:
There is something to investigate, don't know if the bug is upstream in astropy or with us.
The text was updated successfully, but these errors were encountered: