Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/iminuit/minuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2141,11 +2141,12 @@ def draw_mncontour(
from matplotlib import pyplot as plt
from matplotlib.path import Path
from matplotlib.contour import ContourSet
from packaging.version import Version

ix, xname = self._normalize_key(x)
iy, yname = self._normalize_key(y)

mpl_version = tuple(map(int, mpl_version_string.split(".")))
mpl_version = Version(mpl_version_string)

cls = [replace_none(x, 0.68) for x in mutil._iterate(cl)]

Expand All @@ -2162,7 +2163,7 @@ def draw_mncontour(
experimental=experimental,
)
n_lineto = len(pts) - 2
if mpl_version < (3, 5):
if (mpl_version.major, mpl_version.minor) < (3, 5):
n_lineto -= 1 # pragma: no cover
c_val.append(cl)
c_pts.append([pts]) # level can have more than one contour in mpl
Expand Down