k. contour

This file shows the usage of contour() function.

from easy_mpl import contour
import numpy as np
from easy_mpl.utils import version_info

version_info()
{'easy_mpl': '0.21.4', 'matplotlib': '3.8.0', 'numpy': '1.26.1', 'pandas': '2.1.1', 'scipy': '1.11.3'}
_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)
contour
/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)

<Axes: >

show contour labels

contour(_x, _y, _z, label_contours=True, show_points=True)
contour
<Axes: >

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

Gallery generated by Sphinx-Gallery