Description Usage Format Examples
This is a subset of the movies
dataset provided by the ggplot2movies package. It has been filtered
to the years 1913 to 2005 and it only contains the length and the year for each movie.
1 |
An object of class tbl_df
(inherits from tbl
, data.frame
) with 58425 rows and 2 columns.
1 2 3 4 5 6 7 8 | library(ggridges)
ggplot(movie_lengths, aes(x = length, y = year, group = year)) +
geom_density_ridges(scale = 10, size = 0.25, rel_min_height = 0.03, fill = "grey85") +
theme_ridges(center = TRUE) +
scale_x_continuous(limits = c(0, 200), expand = c(0, 0), name = "length (minutes)") +
scale_y_reverse(breaks = c(2000, 1980, 1960, 1940, 1920),
limits = c(2005, 1903), expand = c(0, 0))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.