Closed ksarathbabu closed 1 year ago
@ksarathbabu, use the xline
option to place the x-axis line where you want:
import forestplot as fp
df = fp.load_data("sleep")
ax = 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
xline=.15, # <---- Add this line here
)
If you want to add even more lines, check out the axvline from matplotlib
. You can assign the axes object from fp.forestplot
(like above) and then do a ax.axvline(-.15)
. See the link to the axvline
docs for more parameters to tweak.
Thank you , That worked well. One additional question, One the columns in the table is automatically changed to having two decimal points even though its an integer number. How do I keep it to integer?
can you show an example of what you mean?
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive.
Is there a way to move the xaxis line from 0 to 1 or add a new line in Xaxis?