-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Description
Bug report
The command contour
does not use lw
arguments (unlike, e.g., plot
), and does not report an error or warning. The linewidths
argument works fine. A simple fix is to explicitly look for lw
arguments and set linewidths
to that. Happy to put in a PR for this, but I wanted to check first.
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
print(mpl.__version__)
fig, axes = plt.subplots(ncols=3)
for ax, lw, arg in zip(axes, [1.0, 4.0, 4.0], ['lw', 'lw', 'linewidths']):
aa = np.random.normal(size=1000)
bb = np.random.normal(size=aa.size)
hist, xe, ye = np.histogram2d(aa, bb)
kw = {arg: lw}
ax.contour(hist, **kw)
ax.set_title('{}: {}'.format(arg, lw))
plt.show()
Actual outcome
Matplotlib version
- Matplotlib version: 3.0.2