Skip to content

Commit

Permalink
update readme graph axes
Browse files Browse the repository at this point in the history
  • Loading branch information
gisellerosetta committed Nov 27, 2024
1 parent 225441a commit 88e16e0
Show file tree
Hide file tree
Showing 5 changed files with 1,496 additions and 1,412 deletions.
14 changes: 10 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,16 @@ gapminder |>
slice_max(order_by = pop, n = 5) |>
ggplot() +
geom_col(aes(x = reorder(country, -pop), y = pop/(10^6))) +
scale_y_continuous(expand = c(0, 0)) +
scale_y_continuous(expand = c(0, 0),
limits = c(0, 350),
breaks = c(seq(0, 350, 50)),
labels = c(seq(0, 300, 50), "350 million")) +
scale_fill_discrete_af("focus", reverse = TRUE) +
labs(
x = NULL,
y = NULL,
title = "The U.S.A. is the most populous country in\nthe Americas",
subtitle = "Population of countries in the Americas (millions), 2007",
subtitle = "Population of countries in the Americas, 2007",
caption = "Source: Gapminder"
)
```
Expand All @@ -116,12 +119,15 @@ gapminder |>
slice_max(order_by = pop, n = 5) |>
ggplot(aes(x = reorder(country, -pop), y = pop/(10^6))) +
geom_col(fill = af_colour_values["dark-blue"]) +
scale_y_continuous(expand = c(0, 0)) +
scale_y_continuous(expand = c(0, 0),
limits = c(0, 350),
breaks = c(seq(0, 350, 50)),
labels = c(seq(0, 300, 50), "350 million")) +
labs(
x = NULL,
y = NULL,
title = "The U.S.A. is the most populous country in\nthe Americas",
subtitle = "Population of countries in the Americas (millions), 2007",
subtitle = "Population of countries in the Americas, 2007",
caption = "Source: Gapminder"
)
```
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,16 @@ gapminder |>
slice_max(order_by = pop, n = 5) |>
ggplot() +
geom_col(aes(x = reorder(country, -pop), y = pop/(10^6))) +
scale_y_continuous(expand = c(0, 0)) +
scale_y_continuous(expand = c(0, 0),
limits = c(0, 350),
breaks = c(seq(0, 350, 50)),
labels = c(seq(0, 300, 50), "350 million")) +
scale_fill_discrete_af("focus", reverse = TRUE) +
labs(
x = NULL,
y = NULL,
title = "The U.S.A. is the most populous country in\nthe Americas",
subtitle = "Population of countries in the Americas (millions), 2007",
subtitle = "Population of countries in the Americas, 2007",
caption = "Source: Gapminder"
)
```
Expand All @@ -112,12 +115,15 @@ gapminder |>
slice_max(order_by = pop, n = 5) |>
ggplot(aes(x = reorder(country, -pop), y = pop/(10^6))) +
geom_col(fill = af_colour_values["dark-blue"]) +
scale_y_continuous(expand = c(0, 0)) +
scale_y_continuous(expand = c(0, 0),
limits = c(0, 350),
breaks = c(seq(0, 350, 50)),
labels = c(seq(0, 300, 50), "350 million")) +
labs(
x = NULL,
y = NULL,
title = "The U.S.A. is the most populous country in\nthe Americas",
subtitle = "Population of countries in the Americas (millions), 2007",
subtitle = "Population of countries in the Americas, 2007",
caption = "Source: Gapminder"
)
```
Expand Down
Loading

0 comments on commit 88e16e0

Please sign in to comment.