forestplot` is a Python package to make publication-ready but customizable forest plots.
* GitHub repo: https://github.com/LSYS/forestplot
* Docs: https://forestplot.readthedocs.io
To install via PyPI:
console
pip install forestplot
Quickstart:
python
import forestplot as fp
df = fp.load_data("sleep") companion example data
fp.forestplot(df, the dataframe with results data
estimate="r", col containing estimated effect size
ll="ll", hl="hl", columns containing conf. int. lower and higher limits
varlabel="label", column containing variable label
ylabel="Confidence interval", y-label title
xlabel="Pearson correlation" x-label title
)
More customizations are available, for example:
![](https://raw.githubusercontent.com/LSYS/forestplot/main/docs/images/main.png)