@@ -81,11 +81,11 @@ library(dplyr)
8181library(gapminder )
8282library(afcharts )
8383
84- gapminder | >
84+ gapminder | >
8585 filter(year == 2007 & continent == " Americas" ) | >
8686 slice_max(order_by = pop , n = 5 ) | >
87- ggplot(aes( x = reorder( country , - pop ), y = pop ) ) +
88- geom_col(fill = af_colour_values [ " dark-blue " ] ) +
87+ ggplot() +
88+ geom_col(aes( x = reorder( country , - pop ), y = pop ) ) +
8989 scale_y_continuous(
9090 labels = scales :: label_number(scale = 1E-6 ),
9191 limits = c(0 , 350E6 ),
@@ -96,7 +96,7 @@ gapminder |>
9696 x = NULL ,
9797 y = NULL ,
9898 caption = " Source: Gapminder"
99- )
99+ )
100100```
101101
102102** The U.S.A. is the most populous country in the Americas** <br />
@@ -112,16 +112,17 @@ bars.
112112``` r
113113afcharts :: use_afcharts()
114114
115- gapminder | >
115+ gapminder | >
116116 filter(year == 2007 & continent == " Americas" ) | >
117117 slice_max(order_by = pop , n = 5 ) | >
118118 ggplot(aes(x = reorder(country , - pop ), y = pop )) +
119119 geom_col(fill = af_colour_values [" dark-blue" ]) +
120120 scale_y_continuous(
121121 labels = scales :: label_number(scale = 1E-6 ),
122122 limits = c(0 , 350E6 ),
123- expand = c( 0 , 0 ), expansion(mult = c(0 , 0.1 ))
123+ expand = expansion(mult = c(0 , 0.1 ))
124124 ) +
125+ scale_fill_discrete_af(" focus" , reverse = TRUE ) +
125126 labs(
126127 x = NULL ,
127128 y = NULL ,
0 commit comments