Description Usage Format Details Examples
A palette for the London Underground lines, based on the official palette.
1 2 3 4 5 |
An object of class character
of length 13.
The same yellow as for the Circle Line is used for the combination of the Circle and Hammersmith & City lines.
For 'All Lines', the pink colour of the Transport for London Visitor Centre is used.
underground_lines
is the complement of underground_colours
(swapping the
names and values), for using as the labels
argument to
ggplot2::scalel_*_identity().
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | underground_colours
underground_colors
underground_lines
## Not run:
underground %>%
filter(metric == "Train delays longer than 15 minutes",
year == "2016/17",
is.na(fourweek),
is.na(quarter),
line != "All Lines") %>%
mutate(fill= underground_colours[line]) %>%
select(line, value, fill) %>%
ggplot(aes(line, value, fill = fill)) +
geom_bar(stat = "identity") +
scale_fill_identity("", labels = underground_lines, guide = "legend") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
xlab("") +
ylab("") +
ggtitle("Train delays longer than 15 minutes (2016/17)")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.