Module # 11 E R. Tufte Work
For this assignment, I decided to visualize the Dot-dash plot in ggplot2 example because I have a preference for scatter plots and enjoy learning about more ways to utilize ggplot2.
Code:
ggplot(mtcars, aes(wt, mpg)) + geom_point() + geom_rug() +
theme_tufte(ticks=F) + xlab("Car weight (lb/1000)") + ylab("Miles per gallon of fuel") +
theme(axis.title.x = element_text(vjust=-0.5), axis.title.y = element_text(vjust=1)) + ggtitle("wt vs mpg")
The code provided in the instructions outputs the following visual.
Source: http://motioninsocial.com/tufte/#introduction
Comments
Post a Comment