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
Describe the bug
I would like to pass existing axes to plot_density with the ax keyword. This works fine if I plot data from a single dataset. But I get an error when I try to plot several datasets at once (I think the error arises when it tries to produce a legend).
Plotting several datasets without providing axes also works fine.
To Reproduce
importarvizimportmatplotlib.pyplotasplttest_data=arviz.load_arviz_data('centered_eight')
# This worksfig, ax=plt.subplots(3, 3)
ax1=arviz.plot_density(data=[test_data.posterior], var_names=['mu', 'theta'], ax=ax);
# This works as wellax2=arviz.plot_density(data=[test_data.prior, test_data.posterior], var_names=['mu', 'theta']);
# This does not workfig3, ax3=plt.subplots(3, 3)
arviz.plot_density(data=[test_data.prior, test_data.posterior], var_names=['mu', 'theta'], ax=ax3);
Describe the bug
I would like to pass existing axes to plot_density with the
ax
keyword. This works fine if I plot data from a single dataset. But I get an error when I try to plot several datasets at once (I think the error arises when it tries to produce a legend).Plotting several datasets without providing axes also works fine.
To Reproduce
This is the error I get:
Additional context
ArviZ version: 0.7.0
matplotlib version: 3.2.1
The text was updated successfully, but these errors were encountered: