What's Changed
* Mplot by LSYS in https://github.com/LSYS/forestplot/pull/108
Forestplot
`forestplot` is a Python package to make publication-ready but customizable coefficient 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_mmodel = pd.read_csv("../examples/data/sleep-mmodel.csv").query(
"model=='all' | model=='young kids'"
)
fp.mforestplot(
dataframe=df_mmodel,
estimate="coef",
ll="ll",
hl="hl",
varlabel="label",
capitalize="capitalize",
model_col="model",
color_alt_rows=True,
groupvar="group",
table=True,
rightannote=["var", "group"],
right_annoteheaders=["Source", "Group"],
xlabel="Coefficient (95% CI)",
modellabels=["Have young kids", "Full sample"],
xticks=[-1200, -600, 0, 600],
mcolor=["CC6677", "4477AA"],
Additional kwargs for customizations
**{
"markersize": 30,
override default vertical offset between models (0.0 to 1.0)
"offset": 0.35,
"xlinestyle": (0, (10, 5)), long dash for x-reference line
"xlinecolor": ".8", gray color for x-reference line
},
)
![image](https://github.com/LSYS/forestplot/assets/10510571/a0def294-6cf8-4326-b378-2e24ae2e4e5d)
**Full Changelog**: https://github.com/LSYS/forestplot/compare/v0.3.3...v0.4.0