forestploter icon indicating copy to clipboard operation
forestploter copied to clipboard

How to change legend size?

Open sdsdkklgy opened this issue 2 years ago • 5 comments
trafficstars

I want to change the size of the legend, but I found that there is no relevant code in the introduction:forest_theme.

sdsdkklgy avatar Nov 16 '23 14:11 sdsdkklgy

I don't think there's a way to change the legend size. I will add a feature for this.

adayim avatar Nov 20 '23 23:11 adayim

I don't think there's a way to change the legend size. I will add a feature for this.

Hi, In your legend_grob.R: legend_grob <- function(name = "", label, position = c("right", "top", "bottom"), hgap = unit(0.1, "lines"), #horizontal gap vgap = unit(0.5, "lines"), #vertical gap pch = 15, gp = gpar(lty = 1, col = "black", fill = "black", fontsize = 12, fontfamily = "") may adding "cex=?" in parameter "gp" work? good time

Sifan-T avatar Dec 07 '23 20:12 Sifan-T

Sorry, I was busy. I have added option to change legend size and you can change it by specifying different values for legend_cex in forest_theme. Can you install it from GitHub and let me know if it is working? Thank you.

adayim avatar Dec 09 '23 10:12 adayim

Sorry for the delayed response; I'm delighted the command is working! However, another potential issue is that the legend's text and visuals overlap when you zoom in. Anyway, I much appreciate the update!

sdsdkklgy avatar Dec 10 '23 15:12 sdsdkklgy

Glad it works. Can you paste the output here so I can make sure it works properly?

adayim avatar Dec 10 '23 21:12 adayim