geom_curve | ggplot

geom_curve | ggplot

Quick Start

ggplot() + geom_curve( aes(x = 1, y = 1, xend= 6, yend = 6))

NuGc0H.png

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()

NuGg7d.png

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))

NuGRAA.png

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))

NuGWtI.png

Author

Karobben

Posted on

2020-06-19

Updated on

2024-01-22

Licensed under

Comments