Closed nadthoob closed 1 year ago
I have been passing the kwarg "xline" to fp.forestplot which is then passed to draw_ref_xline(), similar to the customization examples in https://forestplot.readthedocs.io.
import forestplot as fp
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({'name': ['name_a', 'name_b'], 'estimate': [1.1, 1.0]})
df['Lower CI'] = df['estimate'] - 0.05
df['Upper CI'] = df['estimate'] + 0.05
fp.forestplot(df,
estimate='estimate',
varlabel='name',
ll="Lower CI", hl="Upper CI",
figsize=(5,2)
**{
"xline": 1,
"xlinestyle": (1, (10, 5)) # long dash for x-reference line
}
)
plt.show()
@nadthoob please see the above response by @EythorE
thanks @EythorE !
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive.
When plotting hazard or odds ratios in forest plots it would be helpful to be able to change the location of x-reference line--to move it from x=0 to x=1.