Skip to content

Commit

Permalink
Merge pull request datacarpentry#408 from carlosramre/main
Browse files Browse the repository at this point in the history
Update 04-ggplot2.Rmd
  • Loading branch information
juanfung authored Aug 29, 2022
2 parents 9f04575 + 65183bb commit bc1e7d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions _episodes_rmd/04-ggplot2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
```
Expand All @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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)
> > ```
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bc1e7d3

Please sign in to comment.