# Removing grids from SunPy maps

**URL:** <https://community.openastronomy.org/t/removing-grids-from-sunpy-maps/572>\
**Category:** SunPy\
**Tags:** sunpy, question\
**Created:** [January 30, 2023, 9:09am UTC](https://community.openastronomy.org/t/removing-grids-from-sunpy-maps/572 "2023-01-30T09:09:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DMacT](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@DMacT](https://community.openastronomy.org/u/DMacT)\
**Post date:** [January 30, 2023, 9:09am UTC](https://community.openastronomy.org/t/removing-grids-from-sunpy-maps/572/1 "2023-01-30T09:09:44Z")

</div>

Hello,

I’m a new user of SunPy and would like to ask a question which, hopefully, has a simple answer. I’m downloading HMI vector magnetograms (hmi.sharp\_cea\_720s), performing some calculations on them and then plotting them as SunPy maps. The only thing I’ve not been able to do is to remove the grid that appears on each map. For some of the variables that I’m plotting, the grid is a bit distracting and I’d rather remove it. Is there a simple way to do this? Thanks in advance for any advice.

Best wishes,  
David

---

<div class="post-metadata">

**Author:** ![alasdairwilson](https://dub1.discourse-cdn.com/flex005/user_avatar/community.openastronomy.org/alasdairwilson/32/256_2.png) [@alasdairwilson](https://community.openastronomy.org/u/alasdairwilson)\
**Post date:** [January 30, 2023, 1:14pm UTC](https://community.openastronomy.org/t/removing-grids-from-sunpy-maps/572/2 "2023-01-30T13:14:13Z")

</div>

Hi,

So this is very easy to do using matplotlib to turn off the grid on the axes after plotting with Map.plot() like so:

```auto
from sunpy.map import Map
from sunpy.data.sample import AIA_211_IMAGE
from matplotlib import pyplot as plt

m = Map(AIA_211_IMAGE)
ax = plt.axes([0, 0, 1, 1], projection=m)
m.plot()
ax.grid(False)
plt.show()

```

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/openastronomy/original/1X/941bb199baa982c817e7b0980f222dea3164d556.jpeg)

---

<div class="post-metadata">

**Author:** ![DMacT](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@DMacT](https://community.openastronomy.org/u/DMacT)\
**Post date:** [January 30, 2023, 2:22pm UTC](https://community.openastronomy.org/t/removing-grids-from-sunpy-maps/572/3 "2023-01-30T14:22:46Z")

</div>

Perfect! Thanks Alasdair
