Request: Option to move ci_report to right of figure
This is kind of a picky request, but could there be an option to move the confidence interval report to the right of the forest plot, similar to the figure below? I suppose this can be done manually by setting ci_report=False and then recreating it as a separate column typed in by hand. But that would get pretty tedious.
Thanks again for an extremely nice program!
@jdoiii Try something like this:
import forestplot as fp
df = fp.load_data("sleep") # companion example data
df.head(3)
fp.forestplot(
df,
estimate="r",
ll="ll", hl="hl",
varlabel="label",
ci_report=False, # Turn off conf. int. reporting
rightannote=["est_ci"], # Add conf. int. reporting on the right
right_annoteheaders=["Est. (95% CI)"], # Column header
)
@LSYS Thanks for the response.
That works for the sleep dataset, but not mine. The issue appears to be rightannote=["est_ci"] . When I run it on my df I get (not surprisingly): AssertionError: the field ['est_ci'] is not found in dataframe.
I could create a column "est_ci" with the entire text, but I don't understand why the example sleep df works without an "est_ci" column.
Also I notice the sleep df has a column "CI95%". Is that necessary? It seems sort of redundant if you have both hl and ll columns. Is that necessary? I did create it before running my df just in case it was.
EDIT: Please ignore above. I found the information on processed columns at https://pypi.org/project/forestplot/
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive.