这个问题在这里已有答案:
我正在用R中的ggplot2制作一个情节,我想改变我的圆点的厚度。我正在使用没有中心的圆(形状= 1),我想改变线条的粗细。我该怎么办?我正在使用geom_point
尺寸会改变点/圆的大小,它不会对点周围边框的厚度进行充电
这个答案的灵感来自accepted answer的类似问题。
使用美学stroke
小值,零或接近零,如0.1
。
df <- data.frame(x = rep(0, 4), y = rep(0, 4), stroke = (0:3)/4)
ggplot(df) +
geom_point(aes(x, y, stroke = stroke),
shape = 1,
size = 20, colour = 'red') +
facet_wrap(~ stroke)