Imshow and maps coordinates#
How to use imshow with a map and overplot points specified by pixel coordinates and map coordinates.
We start with the sample data and create a submap of a smaller region.
By setting the projection of the axis, a WCSAxes is created and this enables the plot to be created with the map coordinates, in this case helioprojective coordinates. The standard plot command expects pixel coordinates. It is also possible to plot a point using the map coordinates if we pass the transformation but this transform expects the values to be in degrees and not arcseconds.
<matplotlib.image.AxesImage object at 0x7fb37e34b5e0>
Add an overlay grid, showing the native coordinates of the map.
ax.coords.grid(color='yellow', linestyle='solid', alpha=0.5)
plot a point in the middle of the image
[<matplotlib.lines.Line2D object at 0x7fb37e34a9e0>]
Using the transform command expects coordinates in degrees and not arcseconds.
Total running time of the script: (0 minutes 0.380 seconds)