Skip to content

Commit

Permalink
Change blank axis in 08-plot-ggplot to rotated form
Browse files Browse the repository at this point in the history
This addresses the issue here swcarpentry#484
  • Loading branch information
ksamuk committed Apr 5, 2019
1 parent b59077a commit a29e76a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _episodes_rmd/08-plot-ggplot2.Rmd
Expand Up @@ -349,7 +349,7 @@ ggplot(data = az.countries, mapping = aes(x = year, y = lifeExp, color=continent
title = "Figure 1", # main title of figure
color = "Continent" # title of legend
) +
theme(axis.text.x=element_blank(), axis.ticks.x=element_blank())
theme(axis.text.x = element_text(angle = 90, hjust = 1))
```


Expand All @@ -366,7 +366,7 @@ lifeExp_plot <- ggplot(data = az.countries, mapping = aes(x = year, y = lifeExp,
title = "Figure 1", # main title of figure
color = "Continent" # title of legend
) +
theme(axis.text.x=element_blank(), axis.ticks.x=element_blank())
theme(axis.text.x = element_text(angle = 90, hjust = 1))
ggsave(filename = "results/lifeExp.png", plot = lifeExp_plot, width = 12, height = 10, dpi = 300, units = "cm")
```
Expand Down

0 comments on commit a29e76a

Please sign in to comment.