【问题标题】:How to increase the font size of the scales in a plot in R?如何增加 R 图中刻度的字体大小?
【发布时间】:2021-06-24 10:03:33
【问题描述】:

我试图在我的论文中包含一些情节,但比例尺的字体太小。有没有办法让它看起来更大?

Image of the plots

这是我的代码

library(ggbeeswarm)
library(ggpubr)
library(ggplot2)

ggplot(data = wccplots_long, aes(x = wcc.group, y = Value)) +
  geom_boxplot() +
  geom_quasirandom(aes(colour = as.factor(X28_day_mortality) , shape = sex, fill = as.factor(X28_day_mortality)), width = 0.4) + 
  theme(axis.text.x = element_text(angle = 45, hjust = 1 )) +
  labs(x = "WCC Group", y = "Protein level in plasma", title = "Top 5 downregulated Proteins", fill = "Mortality", shape = "Sex", colour = "Mortality",cex.lab=3, cex.axis=3, cex.main=3, cex.sub=3 ) +  stat_compare_means(method = "t.test", comparisons = list(c("Low", "Medium"), c("Low", "High"), c("Medium", "High") ), aes(label = ..p.signif..)) +
  scale_colour_manual(values =c("red", "black")) +
  scale_fill_manual(values =c("red", "black")) +
  scale_shape_manual(values =c(24,22)) + facet_wrap(~Protein, ncol = 5, scales = "free_y", labeller = labeller(Protein = proteinnames)) +
   theme(strip.background = element_rect(fill="skyblue1", size=2, color="black")) +
  theme(strip.text = element_text(size = 14, face = "bold"), aspect.ratio = 1) +
  scale_y_continuous(expand = expansion(mult = c(0.05,0.15) ))

【问题讨论】:

标签: r plot size scale scatter-plot


【解决方案1】:

你有生成它们的代码吗?无论如何,增加导出的 DPI 可能是一种简单的方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-13
    • 2012-07-07
    • 2010-12-04
    • 2016-03-04
    • 2019-10-05
    相关资源
    最近更新 更多