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

.. only:: html

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

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

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

.. _sphx_glr_sample_data_disk.py:


Disk
====

This is a small synthetic unstructured XugridDataset with topology in the shape
of a disk. It contains data on the nodes, faces, and edges.

.. GENERATED FROM PYTHON SOURCE LINES 10-25



.. image-sg:: /sample_data/images/sphx_glr_disk_001.png
   :alt: disk
   :srcset: /sample_data/images/sphx_glr_disk_001.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    <matplotlib.collections.LineCollection object at 0x7f74cfba2630>





|

.. code-block:: Python

    import matplotlib.pyplot as plt

    import xugrid

    uds = xugrid.data.disk()

    fig, axes = plt.subplots(nrows=1, ncols=3, sharex=True, sharey=True, figsize=(15, 5))
    axes = axes.ravel()
    for ax in axes:
        ax.set_aspect(1)

    uds["node_z"].ugrid.plot(ax=axes[0], add_colorbar=False, cmap="terrain")
    uds["face_z"].ugrid.plot(ax=axes[1], add_colorbar=False, cmap="terrain")
    uds["edge_z"].ugrid.plot(ax=axes[2], add_colorbar=False, cmap="terrain")



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

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


.. _sphx_glr_download_sample_data_disk.py:

.. only:: html

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

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

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

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

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

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

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


.. only:: html

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

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