LSYS/forestplot

How do I move/remove the line on the yaxis?

LoveNordling opened this issue · 3 comments

There is a line along the y-axis where x=0. I want this line to be where x=1 or to remove it completely. Is there a way to do this? I've been trying to access it using spines set_position but it didn't work.

LSYS commented

Hi Love, thanks for opening the issue and the question.

To set the vertical line to x=1 use xline=1:

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
              xline=1,
              )

To remove the line, set xline=None.

This issue is stale because it has been open for 30 days with no activity.

This issue was closed because it has been inactive.