You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The graphics format svg (Scalable Vector Graphics) is a common and widespread graphics format. It has the unique advantage of always being sharp at any resolution. It already exists in R with the svg function. I would be happy if graphics could also be saved as svg files with ggexport in the next version of ggpubr. Thank you if that is possible.
The text was updated successfully, but these errors were encountered:
as an alternative, since ggpubr produces ggplot objects you can always just save them using ggplot2::ggsave() (which supports svg outbput) instead of ggpubr::ggexport(). for example :
set.seed(1234)
data = data.frame(sex = factor(rep(c("F", "M"),
each = 200)),
weight = c(rnorm(200, 55),
rnorm(200, 58)))
p <- ggpubr::ggdensity(wdata,
x = "weight",
add = "mean",
rug = TRUE,
color = "sex",
fill = "sex",
palette = c("#00AFBB", "#E7B800"))
ggplot2::ggsave('example_plot.svg', p)
doesn't directly resolve the ggexport() issue, but could be a good option in the mean time.
Thanks for the note. Yes, this is another workaround besides using the svg() and dev.off() functions directly, which have always been able to generate SVG image files for graphics with ggplot2 and ggpubr. But it is surprising that it is not available in the context of the ggpubr package.
The graphics format svg (Scalable Vector Graphics) is a common and widespread graphics format. It has the unique advantage of always being sharp at any resolution. It already exists in R with the svg function. I would be happy if graphics could also be saved as svg files with ggexport in the next version of ggpubr. Thank you if that is possible.
The text was updated successfully, but these errors were encountered: