(gallery_forest_ess)=

# Forest plot with ESS

Multiple panel visualization with a forest plot and ESS information



::::::{tab-set}
:class: full-width
:sync-group: backend

:::::{tab-item} Matplotlib
:sync: matplotlib

![Matplotlib version of plot_forest_ess](_images/plot_forest_ess.png)

:::::

:::::{tab-item} Bokeh
:sync: bokeh

```{bokeh-plot}
:source-position: none

from bokeh.plotting import show

import arviz_stats  # make azstats accessor available
from arviz_base import load_arviz_data

import arviz_plots as azp

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

centered = load_arviz_data("centered_eight")

c_aux = (
centered["posterior"]
.dataset.expand_dims(column=3)
.assign_coords(column=["labels", "forest", "ess"])
)

pc = azp.plot_forest(
c_aux,
combined=True,
backend="bokeh",  # change to preferred backend
)

pc.map(
azp.visuals.scatter_x,
"ess",
data=centered.posterior.ds.azstats.ess(),
coords={"column": "ess"},
color="C0",
)


# for some reason the bokeh plot extension needs explicit use of show
show(pc.viz["figure"].item() if pc.viz["figure"].item() is not None else pc.viz["plot"].item())
```

Link to this page with the [bokeh tab selected](https://arviz-plots.readthedocs.io/en/latest//gallery/plot_forest_ess.html?backend=bokeh#synchronised-tabs)
:::::

:::::{tab-item} Plotly
:sync: plotly

```{jupyter-execute}
:hide-code:

import arviz_stats  # make azstats accessor available
from arviz_base import load_arviz_data

import arviz_plots as azp

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

centered = load_arviz_data("centered_eight")

c_aux = (
centered["posterior"]
.dataset.expand_dims(column=3)
.assign_coords(column=["labels", "forest", "ess"])
)

pc = azp.plot_forest(
c_aux,
combined=True,
backend="plotly",  # change to preferred backend
)

pc.map(
azp.visuals.scatter_x,
"ess",
data=centered.posterior.ds.azstats.ess(),
coords={"column": "ess"},
color="C0",
)
pc.show()
```

Link to this page with the [plotly tab selected](https://arviz-plots.readthedocs.io/en/latest//gallery/plot_forest_ess.html?backend=plotly#synchronised-tabs)
:::::
::::::

```{literalinclude} _scripts/plot_forest_ess.py
:emphasize-lines: 19
```



:::{seealso}
API Documentation: {func}`~arviz_plots.plot_forest`
:::



## Other examples with `plot_forest`

```{eval-rst}
.. minigallery:: plot_forest
```


:::{div} example-plot-download
{download}`Download Python Source Code: plot_forest_ess.py<_scripts/plot_forest_ess.py>`
:::
