Skip to content

Commit

Permalink
fix color pitfalls figure
Browse files Browse the repository at this point in the history
  • Loading branch information
clauswilke committed Sep 22, 2018
1 parent 4366dbb commit b610897
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion pitfalls_of_color_use.Rmd
Expand Up @@ -46,8 +46,11 @@ p_base <- ggplot(popgrowth_df, aes(x = pop2000, y = 100*popgrowth, color = as.ch
ylab("population growth (%)\n2000 to 2010 ") +
theme_dviz_grid() +
theme(legend.text = element_text(size = 10),
legend.title = element_text(size = 12),
legend.justification = "center",
plot.margin = margin(14, 14, 3, 0))
legend.box.margin = margin(14, 0, 28, 0),
legend.spacing.y = unit(2, "pt"),
plot.margin = margin(14, 14, 14, 0))
p_comb <- plot_grid(p_base + theme(legend.position = "none"), get_legend(p_base), ncol = 1)
stamp_bad(p_comb)
Expand Down

0 comments on commit b610897

Please sign in to comment.