Compare Plot#

API documentation: plot_compare()

../_images/mpl_plot_compare.png

Python source code: [download source: matplotlib/mpl_plot_compare.py]

import matplotlib.pyplot as plt

import arviz as az

az.style.use("arviz-darkgrid")


model_compare = az.compare(
    {
        "Centered 8 schools": az.load_arviz_data("centered_eight"),
        "Non-centered 8 schools": az.load_arviz_data("non_centered_eight"),
    }
)
az.plot_compare(model_compare, figsize=(12, 4))

plt.show()

Python source code: [download source: bokeh/bokeh_plot_compare.py]

import arviz as az

model_compare = az.compare(
    {
        "Centered 8 schools": az.load_arviz_data("centered_eight"),
        "Non-centered 8 schools": az.load_arviz_data("non_centered_eight"),
    }
)
ax = az.plot_compare(model_compare, figsize=(12, 4), backend="bokeh")