prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Sample AIA images in the gallery do not show SunPy plotting very well
  The colors selected AIA images in the gallery are badly scaled.  This is probably because the data contain one or two very bright pixels which is throwing the existing scaling off.
  
  Users going to the gallery are seeing badly scaled images, and that's not a good advertisement for SunPy.  Either the images should be changed, the default AIA scaling should be changed, or some clipping of the intensity scale should be included in the example gallery code as appropriate.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `examples/acquiring_data/2011_06_07_sampledata_overview.py`
  Content:
  ```
  1 """
  2 ========================
  3 Sample Data Set Overview
  4 ========================
  5 
  6 An overview of the coordinated sample data set for the SOL-2011-06-07 event.
  7 """
  8 import matplotlib.pyplot as plt
  9 
  10 import sunpy.map
  11 import sunpy.timeseries
  12 import sunpy.data.sample as sample_data
  13 
  14 ###############################################################################
  15 # On 2011 June 7, various solar instruments observed a spectacular solar
  16 # eruptive event coming from NOAA AR 11226. The event included an M2.5 flare, a
  17 # filament eruption, a CME, and a global coronal EUV wave (IAU standard:
  18 # SOL2011-06-07T06:24:00L045C112). This event was spectacular because it
  19 # features the ejection of a large amount of prominence material, much of which
  20 # fails to escape and falls back to the solar surface.
  21 # This example shows off our coordinated sample data set.
  22 # This event got a little bit of press coverage (e.g. `National Geographics
  23 # <https://news.nationalgeographic.com/news/2011/06/110608-solar-flare-sun-science-space/>`_,
  24 # `Discover Magazine <http://blogs.discovermagazine.com/badastronomy/2011/06/07/the-sun-lets-loose-a-huge-explosion/>`_)
  25 # and the literature contains a number of a papers about it (e.g. `Li et al.
  26 # <https://iopscience.iop.org/article/10.1088/0004-637X/746/1/13/meta>`_,
  27 # `Inglis et al. <https://iopscience.iop.org/article/10.1088/0004-637X/777/1/30/meta>`_)
  28 
  29 ###############################################################################
  30 # The following image of the flare is now fairly iconic.
  31 aia_cutout03_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT03_IMAGE)
  32 fig = plt.figure()
  33 aia_cutout03_map.plot()
  34 plt.show()
  35 
  36 ###############################################################################
  37 # Let's take a look at the GOES XRS data.
  38 goes = sunpy.timeseries.TimeSeries(sample_data.GOES_XRS_TIMESERIES)
  39 goes.peek()
  40 plt.show()
  41 
  42 ###############################################################################
  43 # Next let's investigate the AIA full disk images that are available. Please
  44 # note that these images are not at the full AIA resolution.
  45 
  46 aia_131_map = sunpy.map.Map(sample_data.AIA_131_IMAGE)
  47 aia_171_map = sunpy.map.Map(sample_data.AIA_171_IMAGE)
  48 aia_211_map = sunpy.map.Map(sample_data.AIA_211_IMAGE)
  49 aia_335_map = sunpy.map.Map(sample_data.AIA_335_IMAGE)
  50 aia_094_map = sunpy.map.Map(sample_data.AIA_094_IMAGE)
  51 aia_1600_map = sunpy.map.Map(sample_data.AIA_1600_IMAGE)
  52 
  53 fig = plt.figure(figsize=(6, 28))
  54 ax = fig.add_subplot(611, projection=aia_131_map)
  55 aia_131_map.plot()
  56 aia_131_map.draw_grid()
  57 ax = fig.add_subplot(612, projection=aia_171_map)
  58 aia_171_map.plot()
  59 aia_171_map.draw_grid()
  60 ax = fig.add_subplot(613, projection=aia_211_map)
  61 aia_211_map.plot()
  62 aia_211_map.draw_grid()
  63 ax = fig.add_subplot(614, projection=aia_335_map)
  64 aia_335_map.plot()
  65 aia_335_map.draw_grid()
  66 ax = fig.add_subplot(615, projection=aia_094_map)
  67 aia_094_map.plot()
  68 aia_094_map.draw_grid()
  69 ax = fig.add_subplot(616, projection=aia_1600_map)
  70 aia_1600_map.plot()
  71 aia_1600_map.draw_grid()
  72 plt.tight_layout(pad=6.50)
  73 plt.show()
  74 
  75 ###############################################################################
  76 # We also provide a series of AIA cutouts so that you can get a sense of the
  77 # dynamics of the in-falling material.
  78 aia_cutout01_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT01_IMAGE)
  79 aia_cutout02_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT02_IMAGE)
  80 aia_cutout03_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT03_IMAGE)
  81 aia_cutout04_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT04_IMAGE)
  82 aia_cutout05_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT05_IMAGE)
  83 
  84 fig = plt.figure(figsize=(6, 28))
  85 ax = fig.add_subplot(511, projection=aia_cutout01_map)
  86 aia_cutout01_map.plot()
  87 ax = fig.add_subplot(512, projection=aia_cutout02_map)
  88 aia_cutout02_map.plot()
  89 ax = fig.add_subplot(513, projection=aia_cutout03_map)
  90 aia_cutout03_map.plot()
  91 ax = fig.add_subplot(514, projection=aia_cutout04_map)
  92 aia_cutout04_map.plot()
  93 ax = fig.add_subplot(515, projection=aia_cutout05_map)
  94 aia_cutout05_map.plot()
  95 plt.tight_layout(pad=5.50)
  96 plt.show()
  97 
  98 ###############################################################################
  99 # There are a number of other data sources, such as SWAP.
  100 swap_map = sunpy.map.Map(sample_data.SWAP_LEVEL1_IMAGE)
  101 fig = plt.figure()
  102 ax = plt.subplot(projection=swap_map)
  103 swap_map.plot()
  104 plt.show()
  105 
  106 ###############################################################################
  107 # As well as RHESSI.
  108 rhessi_map = sunpy.map.Map(sample_data.RHESSI_IMAGE)
  109 fig = plt.figure()
  110 #ax = plt.subplot(projection=rhessi_map)
  111 ax = plt.subplot()
  112 rhessi_map.plot()
  113 plt.show()
  114
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/examples/acquiring_data/2011_06_07_sampledata_overview.py b/examples/acquiring_data/2011_06_07_sampledata_overview.py
  --- a/examples/acquiring_data/2011_06_07_sampledata_overview.py
  +++ b/examples/acquiring_data/2011_06_07_sampledata_overview.py
  @@ -6,6 +6,7 @@
   An overview of the coordinated sample data set for the SOL-2011-06-07 event.
   """
   import matplotlib.pyplot as plt
  +import astropy.units as u
   
   import sunpy.map
   import sunpy.timeseries
  @@ -52,22 +53,22 @@
   
   fig = plt.figure(figsize=(6, 28))
   ax = fig.add_subplot(611, projection=aia_131_map)
  -aia_131_map.plot()
  +aia_131_map.plot(clip_interval=(0.5, 99.9)*u.percent)
   aia_131_map.draw_grid()
   ax = fig.add_subplot(612, projection=aia_171_map)
  -aia_171_map.plot()
  +aia_171_map.plot(clip_interval=(0.5, 99.9)*u.percent)
   aia_171_map.draw_grid()
   ax = fig.add_subplot(613, projection=aia_211_map)
  -aia_211_map.plot()
  +aia_211_map.plot(clip_interval=(0.5, 99.9)*u.percent)
   aia_211_map.draw_grid()
   ax = fig.add_subplot(614, projection=aia_335_map)
  -aia_335_map.plot()
  +aia_335_map.plot(clip_interval=(0.5, 99.9)*u.percent)
   aia_335_map.draw_grid()
   ax = fig.add_subplot(615, projection=aia_094_map)
  -aia_094_map.plot()
  +aia_094_map.plot(clip_interval=(0.5, 99.9)*u.percent)
   aia_094_map.draw_grid()
   ax = fig.add_subplot(616, projection=aia_1600_map)
  -aia_1600_map.plot()
  +aia_1600_map.plot(clip_interval=(0.5, 99.9)*u.percent)
   aia_1600_map.draw_grid()
   plt.tight_layout(pad=6.50)
   plt.show()
  
verification_info: {"golden_diff": "diff --git a/examples/acquiring_data/2011_06_07_sampledata_overview.py b/examples/acquiring_data/2011_06_07_sampledata_overview.py\n--- a/examples/acquiring_data/2011_06_07_sampledata_overview.py\n+++ b/examples/acquiring_data/2011_06_07_sampledata_overview.py\n@@ -6,6 +6,7 @@\n An overview of the coordinated sample data set for the SOL-2011-06-07 event.\n \"\"\"\n import matplotlib.pyplot as plt\n+import astropy.units as u\n \n import sunpy.map\n import sunpy.timeseries\n@@ -52,22 +53,22 @@\n \n fig = plt.figure(figsize=(6, 28))\n ax = fig.add_subplot(611, projection=aia_131_map)\n-aia_131_map.plot()\n+aia_131_map.plot(clip_interval=(0.5, 99.9)*u.percent)\n aia_131_map.draw_grid()\n ax = fig.add_subplot(612, projection=aia_171_map)\n-aia_171_map.plot()\n+aia_171_map.plot(clip_interval=(0.5, 99.9)*u.percent)\n aia_171_map.draw_grid()\n ax = fig.add_subplot(613, projection=aia_211_map)\n-aia_211_map.plot()\n+aia_211_map.plot(clip_interval=(0.5, 99.9)*u.percent)\n aia_211_map.draw_grid()\n ax = fig.add_subplot(614, projection=aia_335_map)\n-aia_335_map.plot()\n+aia_335_map.plot(clip_interval=(0.5, 99.9)*u.percent)\n aia_335_map.draw_grid()\n ax = fig.add_subplot(615, projection=aia_094_map)\n-aia_094_map.plot()\n+aia_094_map.plot(clip_interval=(0.5, 99.9)*u.percent)\n aia_094_map.draw_grid()\n ax = fig.add_subplot(616, projection=aia_1600_map)\n-aia_1600_map.plot()\n+aia_1600_map.plot(clip_interval=(0.5, 99.9)*u.percent)\n aia_1600_map.draw_grid()\n plt.tight_layout(pad=6.50)\n plt.show()\n", "issue": "Sample AIA images in the gallery do not show SunPy plotting very well\nThe colors selected AIA images in the gallery are badly scaled.  This is probably because the data contain one or two very bright pixels which is throwing the existing scaling off.\r\n\r\nUsers going to the gallery are seeing badly scaled images, and that's not a good advertisement for SunPy.  Either the images should be changed, the default AIA scaling should be changed, or some clipping of the intensity scale should be included in the example gallery code as appropriate.\n", "before_files": [{"content": "\"\"\"\n========================\nSample Data Set Overview\n========================\n\nAn overview of the coordinated sample data set for the SOL-2011-06-07 event.\n\"\"\"\nimport matplotlib.pyplot as plt\n\nimport sunpy.map\nimport sunpy.timeseries\nimport sunpy.data.sample as sample_data\n\n###############################################################################\n# On 2011 June 7, various solar instruments observed a spectacular solar\n# eruptive event coming from NOAA AR 11226. The event included an M2.5 flare, a\n# filament eruption, a CME, and a global coronal EUV wave (IAU standard:\n# SOL2011-06-07T06:24:00L045C112). This event was spectacular because it\n# features the ejection of a large amount of prominence material, much of which\n# fails to escape and falls back to the solar surface.\n# This example shows off our coordinated sample data set.\n# This event got a little bit of press coverage (e.g. `National Geographics\n# <https://news.nationalgeographic.com/news/2011/06/110608-solar-flare-sun-science-space/>`_,\n# `Discover Magazine <http://blogs.discovermagazine.com/badastronomy/2011/06/07/the-sun-lets-loose-a-huge-explosion/>`_)\n# and the literature contains a number of a papers about it (e.g. `Li et al.\n# <https://iopscience.iop.org/article/10.1088/0004-637X/746/1/13/meta>`_,\n# `Inglis et al. <https://iopscience.iop.org/article/10.1088/0004-637X/777/1/30/meta>`_)\n\n###############################################################################\n# The following image of the flare is now fairly iconic.\naia_cutout03_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT03_IMAGE)\nfig = plt.figure()\naia_cutout03_map.plot()\nplt.show()\n\n###############################################################################\n# Let's take a look at the GOES XRS data.\ngoes = sunpy.timeseries.TimeSeries(sample_data.GOES_XRS_TIMESERIES)\ngoes.peek()\nplt.show()\n\n###############################################################################\n# Next let's investigate the AIA full disk images that are available. Please\n# note that these images are not at the full AIA resolution.\n\naia_131_map = sunpy.map.Map(sample_data.AIA_131_IMAGE)\naia_171_map = sunpy.map.Map(sample_data.AIA_171_IMAGE)\naia_211_map = sunpy.map.Map(sample_data.AIA_211_IMAGE)\naia_335_map = sunpy.map.Map(sample_data.AIA_335_IMAGE)\naia_094_map = sunpy.map.Map(sample_data.AIA_094_IMAGE)\naia_1600_map = sunpy.map.Map(sample_data.AIA_1600_IMAGE)\n\nfig = plt.figure(figsize=(6, 28))\nax = fig.add_subplot(611, projection=aia_131_map)\naia_131_map.plot()\naia_131_map.draw_grid()\nax = fig.add_subplot(612, projection=aia_171_map)\naia_171_map.plot()\naia_171_map.draw_grid()\nax = fig.add_subplot(613, projection=aia_211_map)\naia_211_map.plot()\naia_211_map.draw_grid()\nax = fig.add_subplot(614, projection=aia_335_map)\naia_335_map.plot()\naia_335_map.draw_grid()\nax = fig.add_subplot(615, projection=aia_094_map)\naia_094_map.plot()\naia_094_map.draw_grid()\nax = fig.add_subplot(616, projection=aia_1600_map)\naia_1600_map.plot()\naia_1600_map.draw_grid()\nplt.tight_layout(pad=6.50)\nplt.show()\n\n###############################################################################\n# We also provide a series of AIA cutouts so that you can get a sense of the\n# dynamics of the in-falling material.\naia_cutout01_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT01_IMAGE)\naia_cutout02_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT02_IMAGE)\naia_cutout03_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT03_IMAGE)\naia_cutout04_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT04_IMAGE)\naia_cutout05_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT05_IMAGE)\n\nfig = plt.figure(figsize=(6, 28))\nax = fig.add_subplot(511, projection=aia_cutout01_map)\naia_cutout01_map.plot()\nax = fig.add_subplot(512, projection=aia_cutout02_map)\naia_cutout02_map.plot()\nax = fig.add_subplot(513, projection=aia_cutout03_map)\naia_cutout03_map.plot()\nax = fig.add_subplot(514, projection=aia_cutout04_map)\naia_cutout04_map.plot()\nax = fig.add_subplot(515, projection=aia_cutout05_map)\naia_cutout05_map.plot()\nplt.tight_layout(pad=5.50)\nplt.show()\n\n###############################################################################\n# There are a number of other data sources, such as SWAP.\nswap_map = sunpy.map.Map(sample_data.SWAP_LEVEL1_IMAGE)\nfig = plt.figure()\nax = plt.subplot(projection=swap_map)\nswap_map.plot()\nplt.show()\n\n###############################################################################\n# As well as RHESSI.\nrhessi_map = sunpy.map.Map(sample_data.RHESSI_IMAGE)\nfig = plt.figure()\n#ax = plt.subplot(projection=rhessi_map)\nax = plt.subplot()\nrhessi_map.plot()\nplt.show()\n", "path": "examples/acquiring_data/2011_06_07_sampledata_overview.py"}], "after_files": [{"content": "\"\"\"\n========================\nSample Data Set Overview\n========================\n\nAn overview of the coordinated sample data set for the SOL-2011-06-07 event.\n\"\"\"\nimport matplotlib.pyplot as plt\nimport astropy.units as u\n\nimport sunpy.map\nimport sunpy.timeseries\nimport sunpy.data.sample as sample_data\n\n###############################################################################\n# On 2011 June 7, various solar instruments observed a spectacular solar\n# eruptive event coming from NOAA AR 11226. The event included an M2.5 flare, a\n# filament eruption, a CME, and a global coronal EUV wave (IAU standard:\n# SOL2011-06-07T06:24:00L045C112). This event was spectacular because it\n# features the ejection of a large amount of prominence material, much of which\n# fails to escape and falls back to the solar surface.\n# This example shows off our coordinated sample data set.\n# This event got a little bit of press coverage (e.g. `National Geographics\n# <https://news.nationalgeographic.com/news/2011/06/110608-solar-flare-sun-science-space/>`_,\n# `Discover Magazine <http://blogs.discovermagazine.com/badastronomy/2011/06/07/the-sun-lets-loose-a-huge-explosion/>`_)\n# and the literature contains a number of a papers about it (e.g. `Li et al.\n# <https://iopscience.iop.org/article/10.1088/0004-637X/746/1/13/meta>`_,\n# `Inglis et al. <https://iopscience.iop.org/article/10.1088/0004-637X/777/1/30/meta>`_)\n\n###############################################################################\n# The following image of the flare is now fairly iconic.\naia_cutout03_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT03_IMAGE)\nfig = plt.figure()\naia_cutout03_map.plot()\nplt.show()\n\n###############################################################################\n# Let's take a look at the GOES XRS data.\ngoes = sunpy.timeseries.TimeSeries(sample_data.GOES_XRS_TIMESERIES)\ngoes.peek()\nplt.show()\n\n###############################################################################\n# Next let's investigate the AIA full disk images that are available. Please\n# note that these images are not at the full AIA resolution.\n\naia_131_map = sunpy.map.Map(sample_data.AIA_131_IMAGE)\naia_171_map = sunpy.map.Map(sample_data.AIA_171_IMAGE)\naia_211_map = sunpy.map.Map(sample_data.AIA_211_IMAGE)\naia_335_map = sunpy.map.Map(sample_data.AIA_335_IMAGE)\naia_094_map = sunpy.map.Map(sample_data.AIA_094_IMAGE)\naia_1600_map = sunpy.map.Map(sample_data.AIA_1600_IMAGE)\n\nfig = plt.figure(figsize=(6, 28))\nax = fig.add_subplot(611, projection=aia_131_map)\naia_131_map.plot(clip_interval=(0.5, 99.9)*u.percent)\naia_131_map.draw_grid()\nax = fig.add_subplot(612, projection=aia_171_map)\naia_171_map.plot(clip_interval=(0.5, 99.9)*u.percent)\naia_171_map.draw_grid()\nax = fig.add_subplot(613, projection=aia_211_map)\naia_211_map.plot(clip_interval=(0.5, 99.9)*u.percent)\naia_211_map.draw_grid()\nax = fig.add_subplot(614, projection=aia_335_map)\naia_335_map.plot(clip_interval=(0.5, 99.9)*u.percent)\naia_335_map.draw_grid()\nax = fig.add_subplot(615, projection=aia_094_map)\naia_094_map.plot(clip_interval=(0.5, 99.9)*u.percent)\naia_094_map.draw_grid()\nax = fig.add_subplot(616, projection=aia_1600_map)\naia_1600_map.plot(clip_interval=(0.5, 99.9)*u.percent)\naia_1600_map.draw_grid()\nplt.tight_layout(pad=6.50)\nplt.show()\n\n###############################################################################\n# We also provide a series of AIA cutouts so that you can get a sense of the\n# dynamics of the in-falling material.\naia_cutout01_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT01_IMAGE)\naia_cutout02_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT02_IMAGE)\naia_cutout03_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT03_IMAGE)\naia_cutout04_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT04_IMAGE)\naia_cutout05_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT05_IMAGE)\n\nfig = plt.figure(figsize=(6, 28))\nax = fig.add_subplot(511, projection=aia_cutout01_map)\naia_cutout01_map.plot()\nax = fig.add_subplot(512, projection=aia_cutout02_map)\naia_cutout02_map.plot()\nax = fig.add_subplot(513, projection=aia_cutout03_map)\naia_cutout03_map.plot()\nax = fig.add_subplot(514, projection=aia_cutout04_map)\naia_cutout04_map.plot()\nax = fig.add_subplot(515, projection=aia_cutout05_map)\naia_cutout05_map.plot()\nplt.tight_layout(pad=5.50)\nplt.show()\n\n###############################################################################\n# There are a number of other data sources, such as SWAP.\nswap_map = sunpy.map.Map(sample_data.SWAP_LEVEL1_IMAGE)\nfig = plt.figure()\nax = plt.subplot(projection=swap_map)\nswap_map.plot()\nplt.show()\n\n###############################################################################\n# As well as RHESSI.\nrhessi_map = sunpy.map.Map(sample_data.RHESSI_IMAGE)\nfig = plt.figure()\n#ax = plt.subplot(projection=rhessi_map)\nax = plt.subplot()\nrhessi_map.plot()\nplt.show()\n", "path": "examples/acquiring_data/2011_06_07_sampledata_overview.py"}]}