I am trying to create a slightly complex 2D plot with astronomical data, using Matplotlib, and Astropy. It involves a astronomical image, overlaid with a scatter plot, and Matplotlib patches. Using the WCS transform from the image helps place the points of the scatter plot correctly. However, regular Matplotlib patches are distorted if plotted with the WCS transform of an astronomical image - since they do not account for the spherical projection (see Circle patch in example below). It is important that my patches include and exclude certain scatter points. I am trying to achieve something similar to the "Regions" feature from DS9 FITS file reader, but natively in Python. The Astropy guide to overplotting markers and artists is useful for my task. The page provides an rough (incomplete example) of what I am trying to achieve. Unfortunately, as is evident from the section on spherical patches, Astropy ships with a very limited set of patch suitable for spherical projection. Namely, SphericalCircle, and Quadrangle. (See examples of SphericalCircle patch below). I want to plot Ellipses with a similar spherical projection - undistorted like the SphericalCircle patch. Is there a simple and/or standardized way to convert regular Matplotlib 2D patches to Astropy-friendly spherical patches? Continue reading...