Skip to content

Suggestion for "Color bars Conditionally" example in the cookbook. #14

@EvaMaeRey

Description

@EvaMaeRey

Cool book. Just a suggestion here:

ggplot(bar_df,
aes(x = reorder(country, lifeExp), y = lifeExp, fill = country == "Mauritius")) +
geom_col() +
scale_fill_manual(values = c("#dddddd", "#1380A1"), guide = F) +
geom_hline(yintercept = 0, size = 1, colour="#333333") +
bbc_style() +
coord_flip() +
labs(title="Reunion is highest",
subtitle = "Highest African life expectancy, 2007") +
theme(panel.grid.major.x = element_line(color="#cbcbcb"),
panel.grid.major.y = element_blank())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions