pixar_films
library(ggplot2)
headline(
x = min(pixar_films$run_time),
y = max(pixar_films$run_time),
headline =
"The shortest film was {delta} minutes less than the longest film ({orig_values} minutes)"
)
ggplot(pixar_films, aes(bo_intl, rating)) +
geom_boxplot() +
xlim(0, NA) +
labs(title = "International Box Office by MPA Rating")
ggplot(pixar_films, aes(release_date, run_time)) +
geom_line() +
geom_point() +
ylim(0, NA) +
labs(title = "Film runtimes by release date")
ggplot(pixar_films, aes(y = reorder(film, rotten_tomatoes))) +
geom_linerange(aes(xmin = rotten_tomatoes, xmax = metacritic), size = 2, color = "grey85") +
geom_point(aes(x = rotten_tomatoes, color = "rotten_tomatoes")) +
geom_point(aes(x = metacritic, color = "metacritic")) +
scale_color_manual(values = c("steelblue1", "coral2")) +
theme_minimal(base_size = 9) +
labs(
title = "Rotten Tomatoes vs Metacritic by film",
color = NULL,
y = NULL,
x = "Audience Score"
)
Run the code above in your browser using DataLab