-
-
Notifications
You must be signed in to change notification settings - Fork 455
Open
Description
Describe the bug
Passing linewidths to contour_kwargs does not affect contour linewidths.
To Reproduce
import arviz as az
idata = az.load_arviz_data('non_centered_eight')
az.plot_kde(idata.posterior["mu"], idata.posterior["tau"], contour_kwargs=dict(linewidths=0))

A UserWarning is raised:
.../python3.13/site-packages/arviz/plots/backends/matplotlib/kdeplot.py:166: UserWarning: The following kwargs were not used by contour: 'linewidth'
ax.contour(x_x, y_y, density, **contour_kwargs)
Updating plt.rcParams["lines.linewidth"]
does affect linewidths.
From the UserWarning it looks like linewidths
may be being updated to linewidth
, but contour
expects linewidths
Expected behavior
Linewidths to be passed to matplotlib contour.
Additional context
arviz 0.22.0
Metadata
Metadata
Assignees
Labels
No labels