Quick Start
ggplot() + geom_curve( aes(x = 1, y = 1, xend= 6, yend = 6))
|
geom_segment
draws a straight line between points (x, y) and (xend, yend).
geom_curve
draws a curved line.
Arguments
ncp
p <- ggplot() for(i in c(1:10)){ p <- p+ geom_curve( aes(x = 1, y = 1, xend= 6, yend = 6),ncp = i) } p+ theme_light()
|
curvature
p <- ggplot() for(i in c(-10:10)){ p <- p+ geom_curve( aes(x = 1, y = 1, xend= 6, yend = 6), curvature = i*0.1) } p+ theme_light()+ expand_limits(x=c(0,10),y=c(0,6))
|
angle
p <- ggplot() for(i in c(1:9)){ p <- p+ geom_curve( aes(x = 1, y = 1, xend= 6, yend = 6), angle = i*10) } p+ theme_light()+ expand_limits(x=c(0,10),y=c(0,6))
|