From e79e324383a7af256c5138bfe23c5b4489066dd4 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Fri, 21 Oct 2022 17:52:34 +0200 Subject: [PATCH] Clarify that z must be finite for tricountour(f) --- lib/matplotlib/tri/tricontour.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/matplotlib/tri/tricontour.py b/lib/matplotlib/tri/tricontour.py index 666626157517..59dcd7718725 100644 --- a/lib/matplotlib/tri/tricontour.py +++ b/lib/matplotlib/tri/tricontour.py @@ -109,6 +109,10 @@ def _contour_args(self, args, kwargs): The height values over which the contour is drawn. Color-mapping is controlled by *cmap*, *norm*, *vmin*, and *vmax*. + .. note:: + All values in *z* must be finite. Hence, nan and inf values must + either be removed or `~.Triangulation.set_mask` be used. + levels : int or array-like, optional Determines the number and positions of the contour lines / regions.