# NOT RUN {
ggplot(mtcars, aes(factor(cyl))) + geom_bar(fill="white") + theme_black()
dat <- data.frame(y = c(austres), time = time(austres))
ggplot(dat, aes(time, y)) + scale_x_continuous() +
geom_line(color="lightblue", size=1) + theme_black()
# }
# NOT RUN {
library(maps)
crimes <- data.frame(state = tolower(rownames(USArrests)), USArrests)
states_map <-map_data("state")
ggplot(crimes, aes(map_id = state)) +
geom_map(aes(fill = Murder), map = states_map) +
expand_limits(x = states_map$long, y = states_map$lat) +
theme_black() +
scale_fill_gradient(low="grey10", high="white")
# }
Run the code above in your browser using DataLab