You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import matplotlib.pyplot as plt
x = np.arange(-1, 1, 0.1)
y = np.arange(-1, 1, 0.1)
X, Y = np.meshgrid(x, y)
Z = (1-X)**2 + Y**2 # or some other function
fig, ax = plt.subplots()
CS = ax.contourf(X, Y, Z, levels=10)
The issue is in the _contour_level_args function in contour.py, where self.levels is not none because you're passing levels as a keyword argument, which seems to indicate that levels is parsed strangely?
The code you show runs fine with matplotlib 3.0.2. It would throw an error in matplotlib 2.2.3 though.
See #12762 from this comment downwards, as well as #11917.
As mentionned in #12762, maybe we should care about backporting #11917.
Activity
ImportanceOfBeingErnest commentedon Feb 18, 2019
The code you show runs fine with matplotlib 3.0.2. It would throw an error in matplotlib 2.2.3 though.
See #12762 from this comment downwards, as well as #11917.
As mentionned in #12762, maybe we should care about backporting #11917.
jklymak commentedon Mar 4, 2019
Backport attempt at #13583
jklymak commentedon Mar 4, 2019
Closed by #13583; this will be in the next bug fix of 2.2 branch