更改geom_pointrange中点的宽度

更改geom_pointrange中点的宽度,r,ggplot2,resize,R,Ggplot2,Resize,我刚开始学习ggplot2,在尝试使用geom_pointrange更改点的宽度时遇到了困难 我的数据: Pop Beta SE Size lo hi name 2 std1 -1.9590 0.30000000 601 -2.259000 -1.659000 std1 1 std2 -2.2170 0.17480000 1532 -2.391800 -2.042200 std2 3 std3 -2.3180 0.17160000 176

我刚开始学习ggplot2,在尝试使用geom_pointrange更改点的宽度时遇到了困难

我的数据:

   Pop    Beta         SE Size        lo        hi name
2 std1 -1.9590 0.30000000  601 -2.259000 -1.659000 std1
1 std2 -2.2170 0.17480000 1532 -2.391800 -2.042200 std2
3 std3 -2.3180 0.17160000 1763 -2.489600 -2.146400 std3
4 std4 -2.0940 0.18700000 1176 -2.281000 -1.907000 std4
5 std6 -1.5080 0.19670000 1136 -1.704700 -1.311300 std6
6 meta -2.0561 0.08695935 6208 -2.143059 -1.969141 meta
情节:

p <- ggplot()+
  geom_pointrange(data=data, aes(x=name, y=Beta, ymin=lo, ymax=hi), shape=c(rep(22,5),23), lwd=0.3,
                  fill=c(rep("white",5),"white"), color = c(rep("#525252",5),"red"), 
                  fatten = c((data$Size/200)[c(1:5)],5)) +
  geom_hline(yintercept = 0, linetype=2)+
  coord_flip()+
  xlab('') + theme_bw(base_size = 15) +
                      ylab("") + ggtitle(paste(trait,i,sep=" "))
plot(p)

使用绘图编辑:
我希望框的宽度与胡须的宽度相同

尽管未记录,
geom_点范围
对中心点采用与
geom_点
相同的参数。在
?geom_point
的示例中,我们可以看到:

# For shapes that have a border (like 21), you can colour the inside and
# outside separately. Use the stroke aesthetic to modify the width of the
# border

尽管未记录,
geom_点范围
对中心点采用与
geom_点
相同的参数。在
?geom_point
的示例中,我们可以看到:

# For shapes that have a border (like 21), you can colour the inside and
# outside separately. Use the stroke aesthetic to modify the width of the
# border

使用
size
fatten
组合更改点范围的总体/相对大小。或者您正在寻找
笔划
?我有点不确定问题出在哪里(添加绘图可能会有帮助)。我认为语法应该是
width
@Axeman,而不是
lwd
,请参见编辑帖子。。。。我尝试了
stroke
,它解决了我的问题!谢谢使用
size
fatten
组合更改点范围的总体/相对大小。或者您正在寻找
笔划
?我有点不确定问题出在哪里(添加绘图可能会有帮助)。我认为语法应该是
width
@Axeman,而不是
lwd
,请参见编辑帖子。。。。我尝试了
stroke
,它解决了我的问题!谢谢你知道我怎样才能避免通过这些点看到胡须吗,即使填充被指定为“白色”,就像上面的例子一样?感谢我的想法,我如何可以避免看到胡须通过点,即使填充指定为“白色”,如上面的例子?谢谢