Skip to content

Commit

Permalink
Merge pull request #7134 from sunpy/frameless
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Aug 17, 2023
2 parents ec832c2 + c81598c commit 9c6d8bd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/map/plot_frameless_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plotting a Map without any Axes
===============================
This examples shows you how to plot a Map without any annotations at all, i.e.
This examples shows you how to plot a Map without any annotations at all, i.e.,
to save as an image.
"""
import matplotlib.pyplot as plt
Expand All @@ -13,7 +13,7 @@
from sunpy.data.sample import AIA_171_IMAGE

##############################################################################
# Create a sunpy map from the sample data.
# Create a sunpy Map from the sample data.

smap = sunpy.map.Map(AIA_171_IMAGE)

Expand All @@ -26,8 +26,9 @@
# Disable the axis
ax.set_axis_off()

# Plot the map. Since are not interested in the exact map coordinates, we can
# simply use :meth:`~matplotlib.Axes.imshow`.
# Plot the map.
# Since we are not interested in the exact map coordinates,
# we can simply use :meth:`~matplotlib.Axes.imshow`.
norm = smap.plot_settings['norm']
norm.vmin, norm.vmax = np.percentile(smap.data, [1, 99.9])
ax.imshow(smap.data,
Expand All @@ -38,6 +39,7 @@
# sphinx_gallery_defer_figures

##############################################################################
# At this point you could save the figure with ``plt.savefig()`` or show it:
# At this point you could save the figure with :func:`~matplotlib.pyplot.savefig`
# or show it:

plt.show()

0 comments on commit 9c6d8bd

Please sign in to comment.