Posterior KDEs

Posterior KDEs#

KDE plot of the variable mu from the centered eight model. The sample_dims parameter is used to restrict the KDE computation along the draw dimension only.”

Matplotlib version of plot_dist_kde

Link to this page with the bokeh tab selected

Link to this page with the plotly tab selected

from arviz_base import load_arviz_data

import arviz_plots as azp

azp.style.use("arviz-variat")

data = load_arviz_data("centered_eight")
pc = azp.plot_dist(
    data,
    kind="kde",
    var_names=["mu"],
    sample_dims=["draw"],    
    backend="none"  # change to preferred backend
)
pc.show()

See also

API Documentation: plot_dist

EABM chapter on Visualization of Random Variables with ArviZ

Other examples with plot_dist#