# Plot AIAMAP in diferents coordinates

**URL:** <https://community.openastronomy.org/t/plot-aiamap-in-diferents-coordinates/1112>\
**Category:** SunPy\
**Tags:** sunpy\
**Created:** [September 14, 2024, 5:19pm UTC](https://community.openastronomy.org/t/plot-aiamap-in-diferents-coordinates/1112 "2024-09-14T17:19:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lalokura](https://avatars.discourse-cdn.com/v4/letter/l/85f322/32.png) [@Lalokura](https://community.openastronomy.org/u/Lalokura)\
**Post date:** [September 14, 2024, 5:19pm UTC](https://community.openastronomy.org/t/plot-aiamap-in-diferents-coordinates/1112/1 "2024-09-14T17:19:48Z")

</div>

Hi, how can plot this example data:  
import sunpy.map  
import sunpy.data.sample  
import astropy.units as u  
sunpy.data.sample.AIA\_171\_IMAGE

my\_map = sunpy.map.Map(sunpy.data.sample.AIA\_171\_IMAGE)  
import matplotlib.pyplot as plt  
fig = plt.figure()  
ax = fig.add\_subplot(projection=my\_map)  
my\_map.plot(axes=ax, clip\_interval=(1, 99.5)\*u.percent)  
plt.colorbar()  
plt.show()  
The coordinates for default are:\<Helioprojective Frame (obstime=2011-06-07T06:33:02.880, rsun=696000.0 km, observer=\<HeliographicStonyhurst Coordinate (obstime=2011-06-07T06:33:02.880, rsun=696000.0 km): (lon, lat, radius) in (deg, deg, m)  
(-0.00406429, 0.04787238, 1.51846026e+11)\>)\>  
The cuestion is that I want plot this in “Pixels coordinates” and “kilometers”. How I can make this?

---

<div class="post-metadata">

**Author:** ![nabobalis](https://dub1.discourse-cdn.com/flex005/user_avatar/community.openastronomy.org/nabobalis/32/14_2.png) [@nabobalis](https://community.openastronomy.org/u/nabobalis)\
**Post date:** [September 15, 2024, 4:55am UTC](https://community.openastronomy.org/t/plot-aiamap-in-diferents-coordinates/1112/2 "2024-09-15T04:55:33Z")

</div>

Hello @Lalokura,

If you want to plot only pixels coordinates, I think the simplest way is to just use matplotlib directly and plot the map data array using imshow.

I am not personally aware of turning WCSAxes off to do that, but there are more knowledgeable people that might chime in.

For changing the units, you can change the units for the axes by following [Controlling Axes — Astropy v6.1.3](https://docs.astropy.org/en/stable/visualization/wcsaxes/controlling_axes.html#changing-axis-units)

I think if you try km, it errors since they are not convertible out of the box.  
You can get around this with [Equivalencies — Astropy v6.1.3](https://docs.astropy.org/en/stable/units/equivalencies.html#equivalencies)

```python
# I forgot what the conversion factor is for 1 arcsec to km is so I picked a number.
arcsec_to_km = [(u.arcsec, u.km, lambda x: (x * 725)*u.km, lambda x: (x / 725)*u.arcsec)]

```

Then you can try to apply it via:

```python
with u.set_enabled_equivalencies(equivalencies=arcsec_to_km):

```

but I am not sure if this will work.
