We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
show_colormaps() is not big enough to show the colormap names
See attached picture.  This affects the gallery too - see http://docs.sunpy.org/en/stable/generated/gallery/plotting/sunpy_colormaps_reference.html#sphx-glr-generated-gallery-plotting-sunpy-colormaps-reference-py
![figure_1](https://user-images.githubusercontent.com/983575/44535050-2983b400-a6c7-11e8-8bb1-771a40228c83.png)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sunpy/cm/cm.py`
Content:
```
1 """
2 This module provides a set of colormaps specific for solar data.
3 """
4 from __future__ import absolute_import, division, print_function
5 
6 from copy import deepcopy
7 
8 import numpy as np
9 import matplotlib.pyplot as plt
10 import matplotlib.cm as mplcm
11 
12 from sunpy.cm import color_tables as ct
13 from sunpy.util import deprecated
14 
15 __all__ = ['get_cmap', 'show_colormaps', 'cmlist']
16 
17 sdoaia94 = ct.aia_color_table(94)
18 sdoaia131 = ct.aia_color_table(131)
19 sdoaia171 = ct.aia_color_table(171)
20 sdoaia193 = ct.aia_color_table(193)
21 sdoaia211 = ct.aia_color_table(211)
22 sdoaia304 = ct.aia_color_table(304)
23 sdoaia335 = ct.aia_color_table(335)
24 sdoaia1600 = ct.aia_color_table(1600)
25 sdoaia1700 = ct.aia_color_table(1700)
26 sdoaia4500 = ct.aia_color_table(4500)
27 
28 sohoeit171 = ct.eit_color_table(171)
29 sohoeit195 = ct.eit_color_table(195)
30 sohoeit284 = ct.eit_color_table(284)
31 sohoeit304 = ct.eit_color_table(304)
32 
33 # The color tables below returns one of the fundamental color tables for SOHO
34 # LASCO images. These are not the same as those used in SSWIDL.  This is
35 # because the SSWIDL color scaling for LASCO level 0.5 and 1.0 is highly
36 # compressed and does not display the data well.
37 soholasco2 = deepcopy(mplcm.get_cmap("gist_heat"))
38 soholasco2.name = 'SOHO LASCO C2'
39 soholasco3 = deepcopy(mplcm.get_cmap("bone"))
40 soholasco3.name = 'SOHO LASCO C3'
41 
42 # These are the SSWIDL color tables.
43 sswidlsoholasco2 = ct.sswidl_lasco_color_table(2)
44 sswidlsoholasco3 = ct.sswidl_lasco_color_table(3)
45 
46 stereocor1 = ct.cor_color_table(1)
47 stereocor2 = ct.cor_color_table(2)
48 
49 stereohi1 = ct.stereo_hi_color_table(1)
50 stereohi2 = ct.stereo_hi_color_table(2)
51 
52 yohkohsxtal = ct.sxt_color_table('al')
53 yohkohsxtwh = ct.sxt_color_table('wh')
54 
55 hinodexrt = ct.xrt_color_table()
56 hinodesotintensity = ct.sot_color_table('intensity')
57 
58 trace171 = ct.trace_color_table('171')
59 trace195 = ct.trace_color_table('195')
60 trace284 = ct.trace_color_table('284')
61 trace1216 = ct.trace_color_table('1216')
62 trace1550 = ct.trace_color_table('1550')
63 trace1600 = ct.trace_color_table('1600')
64 trace1700 = ct.trace_color_table('1700')
65 traceWL = ct.trace_color_table('WL')
66 
67 hmimag = ct.hmi_mag_color_table()
68 
69 cmlist = {
70           'sdoaia94': sdoaia94,
71           'sdoaia131': sdoaia131,
72           'sdoaia171': sdoaia171,
73           'sdoaia193': sdoaia193,
74           'sdoaia211': sdoaia211,
75           'sdoaia304': sdoaia304,
76           'sdoaia335': sdoaia335,
77           'sdoaia1600': sdoaia1600,
78           'sdoaia1700': sdoaia1700,
79           'sdoaia4500': sdoaia4500,
80           'sohoeit171': sohoeit171,
81           'sohoeit195': sohoeit195,
82           'sohoeit284': sohoeit284,
83           'sohoeit304': sohoeit304,
84           'soholasco2': soholasco2,
85           'soholasco3': soholasco3,
86           'sswidlsoholasco2': sswidlsoholasco2,
87           'sswidlsoholasco3': sswidlsoholasco3,
88           'stereocor1': stereocor1,
89           'stereocor2': stereocor2,
90           'stereohi1': stereohi1,
91           'stereohi2': stereohi2,
92           'rhessi': mplcm.jet,
93           'yohkohsxtal': yohkohsxtal,
94           'yohkohsxtwh': yohkohsxtwh,
95           'hinodexrt': hinodexrt,
96           'hinodesotintensity': hinodesotintensity,
97           'trace171': trace171,
98           'trace195': trace195,
99           'trace284': trace284,
100           'trace1216': trace1216,
101           'trace1550': trace1550,
102           'trace1600': trace1600,
103           'trace1700': trace1700,
104           'traceWL': traceWL,
105           'hmimag': hmimag,
106           'irissji1330': ct.iris_sji_color_table('1330'),
107           'irissji1400': ct.iris_sji_color_table('1400'),
108           'irissji1600': ct.iris_sji_color_table('1600'),
109           'irissji2796': ct.iris_sji_color_table('2796'),
110           'irissji2832': ct.iris_sji_color_table('2832'),
111           'irissji5000': ct.iris_sji_color_table('5000'),
112           'irissjiFUV': ct.iris_sji_color_table('FUV'),
113           'irissjiNUV': ct.iris_sji_color_table('NUV'),
114           'irissjiSJI_NUV': ct.iris_sji_color_table('SJI_NUV')
115 }
116 
117 # Register the colormaps with matplotlib so plt.get_cmap('sdoaia171') works
118 for name, cmap in cmlist.items():
119     mplcm.register_cmap(name=name, cmap=cmap)
120 
121 
122 @deprecated("0.9",
123             "'sunpy.cm.get_cmap' is dprecated, use 'plt.get_cmap' from Matplotlib "
124             "to load the colormaps instead.",
125             alternative='plt.get_cmap')
126 def get_cmap(name):
127     """
128     Get a colormap.
129 
130     Parameters
131     ----------
132     name : string
133         The name of a color map.
134 
135     Returns
136     -------
137     value : matplotlib colormap
138 
139     See Also
140     --------
141 
142     Examples
143     --------
144     >>> import sunpy.cm as cm
145     >>> colormap = cm.get_cmap(name = 'sdoaia94')
146 
147     References
148     ----------
149     | https://matplotlib.org/api/cm_api.html
150 
151     """
152     if name in cmlist:
153         return cmlist.get(name)
154     else:
155         raise ValueError("Colormap {name!s} is not recognized".format(name=name))
156 
157 
158 def show_colormaps(search=None):
159     """Displays a plot of the custom color maps supported in SunPy.
160 
161     Parameters
162     ----------
163     search : str
164         A string to search for in the names of the color maps (e.g. aia, EIT,
165         171). Case insensitive.
166 
167     Returns
168     -------
169     None : none
170 
171     Examples
172     --------
173     >>> import sunpy.cm as cm
174     >>> cm.show_colormaps()
175     >>> cm.show_colormaps(search='aia')
176     >>> cm.show_colormaps(search='171')
177 
178     References
179     ----------
180 
181     """
182 
183     if search is not None:
184         maps = sorted({k: v for (k, v) in cmlist.items() if k.lower().count(search.lower())})
185         if len(maps) == 0:
186             raise KeyError('No color maps found for search term "{:s}"'.format(search))
187     else:
188         maps = sorted(cmlist)
189 
190     nmaps = len(maps) + 1
191 
192     a = np.linspace(0, 1, 256).reshape(1, -1)  # pylint: disable=E1103
193     a = np.vstack((a, a))
194 
195     fig = plt.figure(figsize=(5, 10),dpi=64)
196     fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)
197     for i, name in enumerate(maps):
198         ax = plt.subplot(nmaps, 1, i + 1)
199         plt.axis("off")
200         plt.imshow(a, aspect='auto', cmap=get_cmap(name), origin='lower')
201         pos = list(ax.get_position().bounds)
202         fig.text(pos[0] - 0.01, pos[1], name, fontsize=10,
203                  horizontalalignment='right')
204     plt.show()
205
```
--- 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()

```

diff --git a/sunpy/cm/cm.py b/sunpy/cm/cm.py
--- a/sunpy/cm/cm.py
+++ b/sunpy/cm/cm.py
@@ -192,7 +192,7 @@
     a = np.linspace(0, 1, 256).reshape(1, -1)  # pylint: disable=E1103
     a = np.vstack((a, a))
 
-    fig = plt.figure(figsize=(5, 10),dpi=64)
+    fig = plt.figure(figsize=(7, 10),dpi=128)
     fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)
     for i, name in enumerate(maps):
         ax = plt.subplot(nmaps, 1, i + 1)

{"golden_diff": "diff --git a/sunpy/cm/cm.py b/sunpy/cm/cm.py\n--- a/sunpy/cm/cm.py\n+++ b/sunpy/cm/cm.py\n@@ -192,7 +192,7 @@\n     a = np.linspace(0, 1, 256).reshape(1, -1)  # pylint: disable=E1103\n     a = np.vstack((a, a))\n \n-    fig = plt.figure(figsize=(5, 10),dpi=64)\n+    fig = plt.figure(figsize=(7, 10),dpi=128)\n     fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)\n     for i, name in enumerate(maps):\n         ax = plt.subplot(nmaps, 1, i + 1)\n", "issue": "show_colormaps() is not big enough to show the colormap names\nSee attached picture.  This affects the gallery too - see http://docs.sunpy.org/en/stable/generated/gallery/plotting/sunpy_colormaps_reference.html#sphx-glr-generated-gallery-plotting-sunpy-colormaps-reference-py\r\n![figure_1](https://user-images.githubusercontent.com/983575/44535050-2983b400-a6c7-11e8-8bb1-771a40228c83.png)\r\n\n", "before_files": [{"content": "\"\"\"\nThis module provides a set of colormaps specific for solar data.\n\"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nfrom copy import deepcopy\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as mplcm\n\nfrom sunpy.cm import color_tables as ct\nfrom sunpy.util import deprecated\n\n__all__ = ['get_cmap', 'show_colormaps', 'cmlist']\n\nsdoaia94 = ct.aia_color_table(94)\nsdoaia131 = ct.aia_color_table(131)\nsdoaia171 = ct.aia_color_table(171)\nsdoaia193 = ct.aia_color_table(193)\nsdoaia211 = ct.aia_color_table(211)\nsdoaia304 = ct.aia_color_table(304)\nsdoaia335 = ct.aia_color_table(335)\nsdoaia1600 = ct.aia_color_table(1600)\nsdoaia1700 = ct.aia_color_table(1700)\nsdoaia4500 = ct.aia_color_table(4500)\n\nsohoeit171 = ct.eit_color_table(171)\nsohoeit195 = ct.eit_color_table(195)\nsohoeit284 = ct.eit_color_table(284)\nsohoeit304 = ct.eit_color_table(304)\n\n# The color tables below returns one of the fundamental color tables for SOHO\n# LASCO images. These are not the same as those used in SSWIDL.  This is\n# because the SSWIDL color scaling for LASCO level 0.5 and 1.0 is highly\n# compressed and does not display the data well.\nsoholasco2 = deepcopy(mplcm.get_cmap(\"gist_heat\"))\nsoholasco2.name = 'SOHO LASCO C2'\nsoholasco3 = deepcopy(mplcm.get_cmap(\"bone\"))\nsoholasco3.name = 'SOHO LASCO C3'\n\n# These are the SSWIDL color tables.\nsswidlsoholasco2 = ct.sswidl_lasco_color_table(2)\nsswidlsoholasco3 = ct.sswidl_lasco_color_table(3)\n\nstereocor1 = ct.cor_color_table(1)\nstereocor2 = ct.cor_color_table(2)\n\nstereohi1 = ct.stereo_hi_color_table(1)\nstereohi2 = ct.stereo_hi_color_table(2)\n\nyohkohsxtal = ct.sxt_color_table('al')\nyohkohsxtwh = ct.sxt_color_table('wh')\n\nhinodexrt = ct.xrt_color_table()\nhinodesotintensity = ct.sot_color_table('intensity')\n\ntrace171 = ct.trace_color_table('171')\ntrace195 = ct.trace_color_table('195')\ntrace284 = ct.trace_color_table('284')\ntrace1216 = ct.trace_color_table('1216')\ntrace1550 = ct.trace_color_table('1550')\ntrace1600 = ct.trace_color_table('1600')\ntrace1700 = ct.trace_color_table('1700')\ntraceWL = ct.trace_color_table('WL')\n\nhmimag = ct.hmi_mag_color_table()\n\ncmlist = {\n          'sdoaia94': sdoaia94,\n          'sdoaia131': sdoaia131,\n          'sdoaia171': sdoaia171,\n          'sdoaia193': sdoaia193,\n          'sdoaia211': sdoaia211,\n          'sdoaia304': sdoaia304,\n          'sdoaia335': sdoaia335,\n          'sdoaia1600': sdoaia1600,\n          'sdoaia1700': sdoaia1700,\n          'sdoaia4500': sdoaia4500,\n          'sohoeit171': sohoeit171,\n          'sohoeit195': sohoeit195,\n          'sohoeit284': sohoeit284,\n          'sohoeit304': sohoeit304,\n          'soholasco2': soholasco2,\n          'soholasco3': soholasco3,\n          'sswidlsoholasco2': sswidlsoholasco2,\n          'sswidlsoholasco3': sswidlsoholasco3,\n          'stereocor1': stereocor1,\n          'stereocor2': stereocor2,\n          'stereohi1': stereohi1,\n          'stereohi2': stereohi2,\n          'rhessi': mplcm.jet,\n          'yohkohsxtal': yohkohsxtal,\n          'yohkohsxtwh': yohkohsxtwh,\n          'hinodexrt': hinodexrt,\n          'hinodesotintensity': hinodesotintensity,\n          'trace171': trace171,\n          'trace195': trace195,\n          'trace284': trace284,\n          'trace1216': trace1216,\n          'trace1550': trace1550,\n          'trace1600': trace1600,\n          'trace1700': trace1700,\n          'traceWL': traceWL,\n          'hmimag': hmimag,\n          'irissji1330': ct.iris_sji_color_table('1330'),\n          'irissji1400': ct.iris_sji_color_table('1400'),\n          'irissji1600': ct.iris_sji_color_table('1600'),\n          'irissji2796': ct.iris_sji_color_table('2796'),\n          'irissji2832': ct.iris_sji_color_table('2832'),\n          'irissji5000': ct.iris_sji_color_table('5000'),\n          'irissjiFUV': ct.iris_sji_color_table('FUV'),\n          'irissjiNUV': ct.iris_sji_color_table('NUV'),\n          'irissjiSJI_NUV': ct.iris_sji_color_table('SJI_NUV')\n}\n\n# Register the colormaps with matplotlib so plt.get_cmap('sdoaia171') works\nfor name, cmap in cmlist.items():\n    mplcm.register_cmap(name=name, cmap=cmap)\n\n\n@deprecated(\"0.9\",\n            \"'sunpy.cm.get_cmap' is dprecated, use 'plt.get_cmap' from Matplotlib \"\n            \"to load the colormaps instead.\",\n            alternative='plt.get_cmap')\ndef get_cmap(name):\n    \"\"\"\n    Get a colormap.\n\n    Parameters\n    ----------\n    name : string\n        The name of a color map.\n\n    Returns\n    -------\n    value : matplotlib colormap\n\n    See Also\n    --------\n\n    Examples\n    --------\n    >>> import sunpy.cm as cm\n    >>> colormap = cm.get_cmap(name = 'sdoaia94')\n\n    References\n    ----------\n    | https://matplotlib.org/api/cm_api.html\n\n    \"\"\"\n    if name in cmlist:\n        return cmlist.get(name)\n    else:\n        raise ValueError(\"Colormap {name!s} is not recognized\".format(name=name))\n\n\ndef show_colormaps(search=None):\n    \"\"\"Displays a plot of the custom color maps supported in SunPy.\n\n    Parameters\n    ----------\n    search : str\n        A string to search for in the names of the color maps (e.g. aia, EIT,\n        171). Case insensitive.\n\n    Returns\n    -------\n    None : none\n\n    Examples\n    --------\n    >>> import sunpy.cm as cm\n    >>> cm.show_colormaps()\n    >>> cm.show_colormaps(search='aia')\n    >>> cm.show_colormaps(search='171')\n\n    References\n    ----------\n\n    \"\"\"\n\n    if search is not None:\n        maps = sorted({k: v for (k, v) in cmlist.items() if k.lower().count(search.lower())})\n        if len(maps) == 0:\n            raise KeyError('No color maps found for search term \"{:s}\"'.format(search))\n    else:\n        maps = sorted(cmlist)\n\n    nmaps = len(maps) + 1\n\n    a = np.linspace(0, 1, 256).reshape(1, -1)  # pylint: disable=E1103\n    a = np.vstack((a, a))\n\n    fig = plt.figure(figsize=(5, 10),dpi=64)\n    fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)\n    for i, name in enumerate(maps):\n        ax = plt.subplot(nmaps, 1, i + 1)\n        plt.axis(\"off\")\n        plt.imshow(a, aspect='auto', cmap=get_cmap(name), origin='lower')\n        pos = list(ax.get_position().bounds)\n        fig.text(pos[0] - 0.01, pos[1], name, fontsize=10,\n                 horizontalalignment='right')\n    plt.show()\n", "path": "sunpy/cm/cm.py"}], "after_files": [{"content": "\"\"\"\nThis module provides a set of colormaps specific for solar data.\n\"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nfrom copy import deepcopy\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as mplcm\n\nfrom sunpy.cm import color_tables as ct\nfrom sunpy.util import deprecated\n\n__all__ = ['get_cmap', 'show_colormaps', 'cmlist']\n\nsdoaia94 = ct.aia_color_table(94)\nsdoaia131 = ct.aia_color_table(131)\nsdoaia171 = ct.aia_color_table(171)\nsdoaia193 = ct.aia_color_table(193)\nsdoaia211 = ct.aia_color_table(211)\nsdoaia304 = ct.aia_color_table(304)\nsdoaia335 = ct.aia_color_table(335)\nsdoaia1600 = ct.aia_color_table(1600)\nsdoaia1700 = ct.aia_color_table(1700)\nsdoaia4500 = ct.aia_color_table(4500)\n\nsohoeit171 = ct.eit_color_table(171)\nsohoeit195 = ct.eit_color_table(195)\nsohoeit284 = ct.eit_color_table(284)\nsohoeit304 = ct.eit_color_table(304)\n\n# The color tables below returns one of the fundamental color tables for SOHO\n# LASCO images. These are not the same as those used in SSWIDL.  This is\n# because the SSWIDL color scaling for LASCO level 0.5 and 1.0 is highly\n# compressed and does not display the data well.\nsoholasco2 = deepcopy(mplcm.get_cmap(\"gist_heat\"))\nsoholasco2.name = 'SOHO LASCO C2'\nsoholasco3 = deepcopy(mplcm.get_cmap(\"bone\"))\nsoholasco3.name = 'SOHO LASCO C3'\n\n# These are the SSWIDL color tables.\nsswidlsoholasco2 = ct.sswidl_lasco_color_table(2)\nsswidlsoholasco3 = ct.sswidl_lasco_color_table(3)\n\nstereocor1 = ct.cor_color_table(1)\nstereocor2 = ct.cor_color_table(2)\n\nstereohi1 = ct.stereo_hi_color_table(1)\nstereohi2 = ct.stereo_hi_color_table(2)\n\nyohkohsxtal = ct.sxt_color_table('al')\nyohkohsxtwh = ct.sxt_color_table('wh')\n\nhinodexrt = ct.xrt_color_table()\nhinodesotintensity = ct.sot_color_table('intensity')\n\ntrace171 = ct.trace_color_table('171')\ntrace195 = ct.trace_color_table('195')\ntrace284 = ct.trace_color_table('284')\ntrace1216 = ct.trace_color_table('1216')\ntrace1550 = ct.trace_color_table('1550')\ntrace1600 = ct.trace_color_table('1600')\ntrace1700 = ct.trace_color_table('1700')\ntraceWL = ct.trace_color_table('WL')\n\nhmimag = ct.hmi_mag_color_table()\n\ncmlist = {\n          'sdoaia94': sdoaia94,\n          'sdoaia131': sdoaia131,\n          'sdoaia171': sdoaia171,\n          'sdoaia193': sdoaia193,\n          'sdoaia211': sdoaia211,\n          'sdoaia304': sdoaia304,\n          'sdoaia335': sdoaia335,\n          'sdoaia1600': sdoaia1600,\n          'sdoaia1700': sdoaia1700,\n          'sdoaia4500': sdoaia4500,\n          'sohoeit171': sohoeit171,\n          'sohoeit195': sohoeit195,\n          'sohoeit284': sohoeit284,\n          'sohoeit304': sohoeit304,\n          'soholasco2': soholasco2,\n          'soholasco3': soholasco3,\n          'sswidlsoholasco2': sswidlsoholasco2,\n          'sswidlsoholasco3': sswidlsoholasco3,\n          'stereocor1': stereocor1,\n          'stereocor2': stereocor2,\n          'stereohi1': stereohi1,\n          'stereohi2': stereohi2,\n          'rhessi': mplcm.jet,\n          'yohkohsxtal': yohkohsxtal,\n          'yohkohsxtwh': yohkohsxtwh,\n          'hinodexrt': hinodexrt,\n          'hinodesotintensity': hinodesotintensity,\n          'trace171': trace171,\n          'trace195': trace195,\n          'trace284': trace284,\n          'trace1216': trace1216,\n          'trace1550': trace1550,\n          'trace1600': trace1600,\n          'trace1700': trace1700,\n          'traceWL': traceWL,\n          'hmimag': hmimag,\n          'irissji1330': ct.iris_sji_color_table('1330'),\n          'irissji1400': ct.iris_sji_color_table('1400'),\n          'irissji1600': ct.iris_sji_color_table('1600'),\n          'irissji2796': ct.iris_sji_color_table('2796'),\n          'irissji2832': ct.iris_sji_color_table('2832'),\n          'irissji5000': ct.iris_sji_color_table('5000'),\n          'irissjiFUV': ct.iris_sji_color_table('FUV'),\n          'irissjiNUV': ct.iris_sji_color_table('NUV'),\n          'irissjiSJI_NUV': ct.iris_sji_color_table('SJI_NUV')\n}\n\n# Register the colormaps with matplotlib so plt.get_cmap('sdoaia171') works\nfor name, cmap in cmlist.items():\n    mplcm.register_cmap(name=name, cmap=cmap)\n\n\n@deprecated(\"0.9\",\n            \"'sunpy.cm.get_cmap' is dprecated, use 'plt.get_cmap' from Matplotlib \"\n            \"to load the colormaps instead.\",\n            alternative='plt.get_cmap')\ndef get_cmap(name):\n    \"\"\"\n    Get a colormap.\n\n    Parameters\n    ----------\n    name : string\n        The name of a color map.\n\n    Returns\n    -------\n    value : matplotlib colormap\n\n    See Also\n    --------\n\n    Examples\n    --------\n    >>> import sunpy.cm as cm\n    >>> colormap = cm.get_cmap(name = 'sdoaia94')\n\n    References\n    ----------\n    | https://matplotlib.org/api/cm_api.html\n\n    \"\"\"\n    if name in cmlist:\n        return cmlist.get(name)\n    else:\n        raise ValueError(\"Colormap {name!s} is not recognized\".format(name=name))\n\n\ndef show_colormaps(search=None):\n    \"\"\"Displays a plot of the custom color maps supported in SunPy.\n\n    Parameters\n    ----------\n    search : str\n        A string to search for in the names of the color maps (e.g. aia, EIT,\n        171). Case insensitive.\n\n    Returns\n    -------\n    None : none\n\n    Examples\n    --------\n    >>> import sunpy.cm as cm\n    >>> cm.show_colormaps()\n    >>> cm.show_colormaps(search='aia')\n    >>> cm.show_colormaps(search='171')\n\n    References\n    ----------\n\n    \"\"\"\n\n    if search is not None:\n        maps = sorted({k: v for (k, v) in cmlist.items() if k.lower().count(search.lower())})\n        if len(maps) == 0:\n            raise KeyError('No color maps found for search term \"{:s}\"'.format(search))\n    else:\n        maps = sorted(cmlist)\n\n    nmaps = len(maps) + 1\n\n    a = np.linspace(0, 1, 256).reshape(1, -1)  # pylint: disable=E1103\n    a = np.vstack((a, a))\n\n    fig = plt.figure(figsize=(7, 10),dpi=128)\n    fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)\n    for i, name in enumerate(maps):\n        ax = plt.subplot(nmaps, 1, i + 1)\n        plt.axis(\"off\")\n        plt.imshow(a, aspect='auto', cmap=get_cmap(name), origin='lower')\n        pos = list(ax.get_position().bounds)\n        fig.text(pos[0] - 0.01, pos[1], name, fontsize=10,\n                 horizontalalignment='right')\n    plt.show()\n", "path": "sunpy/cm/cm.py"}]}