.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/shading/plot_colormap_reference.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_shading_plot_colormap_reference.py: Colormap reference ================== Plot hyoga altitude and relief colormaps. .. GENERATED FROM PYTHON SOURCE LINES 11-37 .. image-sg:: /examples/shading/images/sphx_glr_plot_colormap_reference_001.png :alt: Hyoga colormaps :srcset: /examples/shading/images/sphx_glr_plot_colormap_reference_001.png :class: sphx-glr-single-img .. code-block:: default import numpy as np import matplotlib.pyplot as plt import hyoga # register colormaps, pylint: disable=unused-import # initialize figure fig, axes = plt.subplots(nrows=5) fig.subplots_adjust(left=0.2) # prepare gradient image gradient = np.linspace(0, 1, 256) gradient = np.vstack((gradient, gradient)) # plot background pattern and color gradients colormaps = ['Bathymetric', 'Topographic', 'Elevational', 'Matte', 'Glossy'] for ax, name in zip(axes, colormaps): ax.patch.set(hatch='..', edgecolor='0.5') ax.imshow(gradient, aspect='auto', cmap=name) ax.text(-8, .5, name, va='center', ha='right', fontsize=10) ax.set(xticks=[], yticks=[]) # set title axes[0].set_title('Hyoga colormaps') # show plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.141 seconds) .. _sphx_glr_download_examples_shading_plot_colormap_reference.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_colormap_reference.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_colormap_reference.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_