Drawing line and point graphs in ggplot

in ggplot •  7 years ago 

library(ggplot2)
ggplot(pressure, aes(x=temperature, y=pressure)) +
geom_line() +
geom_point() +
geom_line(mapping = aes(y=pressure/2, colour="red")) +
geom_point(mapping = aes(y=pressure/2), colour="red")

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!