.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/contour.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_contour.py: =========== k. contour =========== .. currentmodule:: easy_mpl This file shows the usage of :func:`contour` function. .. GENERATED FROM PYTHON SOURCE LINES 9-16 .. code-block:: Python from easy_mpl import contour import numpy as np from easy_mpl.utils import version_info version_info() .. rst-class:: sphx-glr-script-out .. code-block:: none {'easy_mpl': '0.21.5', 'matplotlib': '3.9.4', 'numpy': '2.0.2', 'pandas': '2.2.3', 'scipy': '1.13.1'} .. GENERATED FROM PYTHON SOURCE LINES 17-23 .. code-block:: Python _x = np.random.uniform(-2, 2, 200) _y = np.random.uniform(-2, 2, 200) _z = _x * np.exp(-_x**2 - _y**2) contour(_x, _y, _z, fill_between=True, show_points=True) .. image-sg:: /auto_examples/images/sphx_glr_contour_001.png :alt: contour :srcset: /auto_examples/images/sphx_glr_contour_001.png, /auto_examples/images/sphx_glr_contour_001_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/easy-mpl/checkouts/latest/easy_mpl/_contour.py:115: UserWarning: The following kwargs were not used by contour: 'linewidth' CS = ax.tricontour(x, y, z, **_kws) .. GENERATED FROM PYTHON SOURCE LINES 24-25 show contour labels .. GENERATED FROM PYTHON SOURCE LINES 25-27 .. code-block:: Python contour(_x, _y, _z, label_contours=True, show_points=True) .. image-sg:: /auto_examples/images/sphx_glr_contour_002.png :alt: contour :srcset: /auto_examples/images/sphx_glr_contour_002.png, /auto_examples/images/sphx_glr_contour_002_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.371 seconds) .. _sphx_glr_download_auto_examples_contour.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/sphinx-gallery/sphinx-gallery.github.io/master?urlpath=lab/tree/notebooks/auto_examples/contour.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: contour.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: contour.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: contour.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_