
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "examples/shading/plot_hillshade_colormaps.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_examples_shading_plot_hillshade_colormaps.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_examples_shading_plot_hillshade_colormaps.py:


Hillshade colormaps
===================

Plot shaded relief map using glossy and matte colormaps.

.. GENERATED FROM PYTHON SOURCE LINES 11-36



.. image-sg:: /examples/shading/images/sphx_glr_plot_hillshade_colormaps_001.png
   :alt: Glossy, Matte
   :srcset: /examples/shading/images/sphx_glr_plot_hillshade_colormaps_001.png
   :class: sphx-glr-single-img





.. code-block:: Python


    import matplotlib.pyplot as plt
    import hyoga

    # initialize figure
    fig, axes = plt.subplots(ncols=2)

    # open demo data with refined topography
    with hyoga.open.example('pism.alps.vis.refined.nc') as ds:
        ds = ds.sel(x=slice(380e3, 435e3))

        # plot bedrock altitude
        for ax in axes:
            ds.hyoga.plot.bedrock_altitude(ax=ax, cmap='Topographic', vmin=0)

        # add hillshades
        ds.hyoga.plot.bedrock_hillshade(ax=axes[0], cmap='Glossy')
        ds.hyoga.plot.bedrock_hillshade(ax=axes[1], cmap='Matte', vmin=0)

    # set titles
    axes[0].set_title('Glossy')
    axes[1].set_title('Matte')

    # show
    plt.show()


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 0.235 seconds)


.. _sphx_glr_download_examples_shading_plot_hillshade_colormaps.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: plot_hillshade_colormaps.ipynb <plot_hillshade_colormaps.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: plot_hillshade_colormaps.py <plot_hillshade_colormaps.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: plot_hillshade_colormaps.zip <plot_hillshade_colormaps.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
