ggplot2 , , . , data
ggplot . .
ggplot() +
geom_point(data=mtcars, aes(hp, mpg)) +
geom_segment(aes(x = 100, xend = 200, y = 20, yend = 20),
inherit.aes = FALSE,
size = 10,
alpha = 0.5,
color = "blue")
- , :
ggplot(mtcars) +
geom_point(aes(hp, mpg)) +
annotate(
'segment',
x = 100,
xend = 200,
y = 20,
yend = 20,
size = 10,
colour = "blue",
alpha = 0.5
)