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

.. only:: html

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

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

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

.. _sphx_glr_auto_examples_pcolor_example.py:


Unevenly spaced data
====================

Basic demonstration of pcolor, which can deal with unevenly spaced data

.. note::
    Right now, we just do this with real/imaginary,
    but in principal, it should be easily
    possible to extend this to use domain
    coloring (and to use it in the main DCCT
    method)

.. GENERATED FROM PYTHON SOURCE LINES 14-30



.. rst-class:: sphx-glr-horizontal


    *

      .. image-sg:: /auto_examples/images/sphx_glr_pcolor_example_001.png
         :alt: colorscales dependent, (real), (imag)
         :srcset: /auto_examples/images/sphx_glr_pcolor_example_001.png
         :class: sphx-glr-multi-img

    *

      .. image-sg:: /auto_examples/images/sphx_glr_pcolor_example_002.png
         :alt: colorscales independent, (real), (imag)
         :srcset: /auto_examples/images/sphx_glr_pcolor_example_002.png
         :class: sphx-glr-multi-img





.. code-block:: Python


    import pyspecdata as psp
    import matplotlib.pylab as plt
    from numpy import r_

    x = psp.nddata(r_[-5, -2, -1, -0.5, 0, 0.5, 5], "x")
    y = psp.nddata(3 * r_[-5, -2, -1, -0.5, 0, 0.5, 5], "y")
    z = plt.exp(-((y - 2) ** 2) - (x - 0) ** 2 / 2) + 1j * x
    plt.figure()
    plt.suptitle("colorscales dependent")
    z.dimlabels
    z.pcolor()
    plt.figure()
    plt.suptitle("colorscales independent")
    z.pcolor(scale_independently=True)
    plt.show()


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

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


.. _sphx_glr_download_auto_examples_pcolor_example.py:

.. only:: html

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

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

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

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

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


.. only:: html

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

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