0

我根据上一篇文章 如何在 R 中创建优势比和 95 % CI 图使用以下代码来生成下面发布的图。我想:1)使 x 和 y 轴以及图例加粗 2)增加线条的粗细

我怎么能在ggplot中做到这一点?

ggplot(alln, aes(x = apoll2, y = increase, ymin = l95, ymax = u95)) + geom_pointrange(aes(col = factor(marker)), position=position_dodge(width=0.50)) + 
    ylab("Percent increase & 95% CI") + geom_hline(aes(yintercept = 0)) + scale_color_discrete(name = "Marker") + xlab("")

在此处输入图像描述

4

1 回答 1

2

要更改轴和图例外观,您应该添加theme()到绘图中。

+ theme(axis.text=element_text(face="bold"),
        legend.text=element_text(face="bold"))

要使线路更宽,请ize=1.5geom_pointrange()调用中添加 s。

于 2013-08-14T12:16:04.147 回答