Overlapping columns in R function forest in the meta package

39 views Asked by At

Thank you very much for helping me with the issue I am having today. I am trying to create a forest plot using the forest function in R (meta package) but for some reason I am unable to change the size of the columns which means that my bars are overlapping with the column next to it.

Here is a snippet of my code:

# create theme of forest plot
tm <- forest_theme(base_size = 15,
  ci_pch = 20,
  ci_col = "#0e8abb",
  ci_fill = "red",
  ci_alpha = 1,
  ci_lty = 1,
  ci_lwd = 2,
  ci_Theight = 0.2,
  refline_lwd = 1,
  refline_lty = "dashed",
  refline_col = "grey20",
  vertline_lwd = 1,
  vertline_lty = "dashed",
  vertline_col = "grey20",
  summary_fill = "#006400",
  summary_col = "#006400"
)



# draw forest plot
a <- forest(reliability[, c(1, 5:7)],
               est = reliability$spearmanbrown,
               lower = reliability$SB_low,
               upper = reliability$SB_high,
               sizes = 0.8,
               ci_column = 4,
               ref_line = 0.7,
               xlim = c(0,1),
               ticks_at = c(0, 0.2, 0.4, 0.6, 0.8, 1.0),
               xlab = "Split-half reliability",
               colgap = unit(10, "mm"),
               theme = tm)
a

And this is a screenshot of the issue:

Screenshot of issue

I tried using all commands given on this link: https://www.rdocumentation.org/packages/meta/versions/1.1-2/topics/forest. So I have tried using fontsize=12, boxsize=0.8, plotwidth=unit(6, "cm"), colgap=unit(2, "mm")...I have also tried changing these values to see if it works but nothing seems to be making a difference to my plot (i.e., the figure does not change at all).

0

There are 0 answers