Skip to content
Snippets Groups Projects
Commit abf8dc4f authored by Carine Rey's avatar Carine Rey
Browse files

add year in title

parent c40baff3
No related branches found
No related tags found
1 merge request!6Switch to main as default branch
......@@ -432,7 +432,8 @@ For this we need to add a `transition_time` layer that will take as an argument
ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent)) +
geom_point() +
scale_x_log10() +
transition_time(year)
transition_time(year) +
labs(title = 'Year: {as.integer(frame_time)}')
```
</p>
</details>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment