diff --git a/_episodes_rmd/04-ggplot2.Rmd b/_episodes_rmd/04-ggplot2.Rmd index d08e59861..39285e462 100644 --- a/_episodes_rmd/04-ggplot2.Rmd +++ b/_episodes_rmd/04-ggplot2.Rmd @@ -215,7 +215,7 @@ opposed to lighter gray): ```{r adding-transparency, purl=FALSE} interviews_plotting %>% ggplot(aes(x = no_membrs, y = number_items)) + - geom_point(alpha = 0.5) + geom_point(alpha = 0.3) ``` That only helped a little bit with the overplotting problem, so let's try option @@ -244,7 +244,7 @@ between 0.1 and 0.4. Experiment with the values to see how your plot changes. ```{r adding-width-height, purl=FALSE} interviews_plotting %>% ggplot(aes(x = no_membrs, y = number_items)) + - geom_jitter(alpha = 0.5, + geom_jitter(alpha = 0.3, width = 0.2, height = 0.2) ``` @@ -255,7 +255,7 @@ a `color` argument inside the `geom_jitter()` function: ```{r adding-colors, purl=FALSE} interviews_plotting %>% ggplot(aes(x = no_membrs, y = number_items)) + - geom_jitter(alpha = 0.5, + geom_jitter(alpha = 0.3, color = "blue", width = 0.2, height = 0.2) @@ -278,7 +278,7 @@ of the observation: ```{r color-by-species, purl=FALSE} interviews_plotting %>% ggplot(aes(x = no_membrs, y = number_items)) + - geom_jitter(aes(color = village), alpha = 0.5, width = 0.2, height = 0.2) + geom_jitter(aes(color = village), alpha = 0.3, width = 0.2, height = 0.2) ``` There appears to be a positive trend between number of household @@ -315,7 +315,7 @@ this trend does not appear to be different by village. > > interviews_plotting %>% > > ggplot(aes(x = village, y = rooms)) + > > geom_jitter(aes(color = respondent_wall_type), -> > alpha = 0.5, +> > alpha = 0.3, > > width = 0.2, > > height = 0.2) > > ``` @@ -345,7 +345,7 @@ measurements and of their distribution: interviews_plotting %>% ggplot(aes(x = respondent_wall_type, y = rooms)) + geom_boxplot(alpha = 0) + - geom_jitter(alpha = 0.5, + geom_jitter(alpha = 0.3, color = "tomato", width = 0.2, height = 0.2)