When using ggplot, I can set shape
to 21-25 to get shapes that have independent setting for the internal (fill
) and border (col
) colors, like so:
df <- data.frame(id=runif(12), x=1:12, y=runif(12))
ggplot(df, aes(x=x, y=y)) +
geom_point(aes(fill=id, size=id), colour="black", shape=21)
However, I can't figure out how to control the thickness of the shape borders, either setting them absolutely or as an aesthetic mapping. I note that if I set an lwd
value, it overrides the size
aesthetic:
ggplot(df, aes(x=x, y=y)) +
geom_point(aes(fill=id, size=id), colour="black", shape=21, lwd=2)
How do I control the border thickness?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…