geom_point()
geom_segment()
geom_smooth(method = lm, se = FALSE)
geom_smooth(se = FALSE)
geom_smooth()
geom_rect()
geom_segment()
This is a scatterplot with segments!
Thanks to WSJ.
There is also geom_curve
for brave people
Thanks to Winston Chang.
Or both.
Suppose you want to do this many times
df <- data.frame(x = c(1, 2, 3),
y = c(10, 20, 30),
z = c(100, 200, 300))
tolog <- c("x","y","z")
df[paste0("ln.",tolog)] <- log(df[tolog])
df
x y z ln.x ln.y ln.z
1 1 10 100 0.0000000 2.302585 4.605170
2 2 20 200 0.6931472 2.995732 5.298317
3 3 30 300 1.0986123 3.401197 5.703782