Skip to content

Commit

Permalink
adding gut checks
Browse files Browse the repository at this point in the history
  • Loading branch information
carriewright11 committed Oct 7, 2024
1 parent 1061c10 commit abdb4b7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions modules/Data_Visualization/Data_Visualization.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,21 @@ er_visits_4 %>% ggplot(aes(x = year,
- `scale_x_continuous()` and `scale_y_continuous()` can modify the scale of the axes
- by default, `ggplot()` removes points with missing values from plots.

## GUT CHECK: If we get an empty plot what might we need to do?

A. Add a `plot_` layer like `plot_point()`

B. Add a `geom_` layer like `geom_point()`


## GUT CHECK: How do we add more layers in ggplot2 plots?

A. `%>%`

B. `&`

C. `+`

## Lab 1

🏠 [Class Website](https://daseh.org/)
Expand Down Expand Up @@ -953,6 +968,20 @@ ggsave(filename = "saved_plot.png", # will save in working directory
width = 6, height = 3.5) # by default in inches
```

## GUT CHECK: How to we make sure that the boxplots are filled with color instead of just the outside boarder?

A. Use the `fill` argument in the `aes` specification

B. Use `color` argument in `geom_boxplot()`

## GUT CHECK: If our plot is too complicated to read, what might be a good option to fix this?

A. add more `theme()` layers

B. Use `facet_grid()` to split the plot up



## Summary

- The `theme()` function helps you specify aspects about your plot
Expand Down

0 comments on commit abdb4b7

Please sign in to comment.