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.5', 'matplotlib': '3.9.4', 'numpy': '2.0.2', 'pandas': '2.2.3', 'scipy': '1.13.1'}
_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.371 seconds)

Gallery generated by Sphinx-Gallery