Here is a short example:
> V1 = c('a','a','b','b') # categories
> V2 = c(1,3,4,2) # y values
> V3 = c(1,2,1,2) # x values
> data.frame(V1,V2,V3)
V1 V2 V3
1 a 1 1
2 a 3 2
3 b 4 1
4 b 2 2
> ggplot(data.frame(V1,V2,V3), aes(x=V3, y=V2, size=V1)) + geom_point() + geom_line()
However, I would like to link the two points in the same category (as in the plot) ALWAYS using a line of size 1, instead of also scaling the line size AS WELL AS the point size. In other words, I want to scale the ONLY the point size but NOT the lines. I tried this:
> ggplot(data.frame(V1,V2,V3), aes(x=V3, y=V2, size=V1)) + geom_point() + geom_line(size=1)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.