Add Reference Bands

Add Reference Bands#

Draw reference bands to highlight specific regions.

Matplotlib version of add_reference_bands

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")
rope = [(-1, 1)]
pc = azp.plot_forest(
    data,
    backend="none",   # change to preferred backend
)
pc.coords = {"column": "forest"}
pc = azp.add_bands(
    pc,
    values=rope,
    visuals={"ref_band":{"color": "#f66d7f"}},
)

pc.show()

See also

API Documentation: add_bands

Other examples with plot_forest#