Skip to content

Commit

Permalink
making things fit slides
Browse files Browse the repository at this point in the history
  • Loading branch information
carriewright11 committed Jul 14, 2024
1 parent 3776757 commit f4c8c50
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions modules/Data_Visualization/Data_Visualization.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ Line breaks can be specified using `\n` within the `labs()` function to have a l
```{r, fig.width=4, fig.height=2.5, fig.align='center'}
ggplot(er_state, aes(x = year, y = rate)) +
geom_point(size = 5, color = "red", alpha = 0.5) +
geom_line(size = 0.8, color = "brown", linetype = 2) + labs(title = "My plot of Heat-Related ER Visits in CO: \n age-adjusted visit rate by year",
geom_line(size = 0.8, color = "brown", linetype = 2) +
labs(title = "My plot of Heat-Related ER Visits in CO: \n age-adjusted visit rate by year",
x = "Year",
y = "Age-adjusted Visit Rate")
```
Expand Down Expand Up @@ -390,7 +391,8 @@ plot_scale
ggplot(er_state, aes(x = year, y = rate)) +
geom_point(size = 5, color = "green", alpha = 0.5) +
geom_line(size = 0.8, color = "blue", linetype = 2) + labs(title = "My plot of Heat-Related ER Visits in CO",
geom_line(size = 0.8, color = "blue", linetype = 2) +
labs(title = "My plot of Heat-Related ER Visits in CO",
x = "Year",
y = "Age-adjusted Visit Rate") +
ylim(0, max(pull(er_visits_all, rate)))
Expand Down Expand Up @@ -418,7 +420,8 @@ You can add to a plot object to make changes! Note that we can save our plots as
plt1 <- ggplot(er_state, aes(x = year, y = rate,)) +
geom_point(size = 5, color = "green", alpha = 0.5) +
geom_line(size = 0.8, color = "blue", linetype = 2) + labs(title = "My plot of Heat-Related ER Visits in CO",
geom_line(size = 0.8, color = "blue", linetype = 2) +
labs(title = "My plot of Heat-Related ER Visits in CO",
x = "Year",
y = "Age-adjusted Visit Rate") +
ylim(0, max(pull(er_visits_all, rate)))
Expand Down Expand Up @@ -487,7 +490,8 @@ The `theme()` function can help you modify various elements of your plot. Here w
```{r, fig.width=5, fig.height=3, fig.align='center'}
ggplot(er_state, aes(x = year, y = rate)) +
geom_point(size = 5, color = "green", alpha = 0.5) +
geom_line(size = 0.8, color = "blue", linetype = 2) + labs(title = "My plot of Heat-Related ER Visits in CO") +
geom_line(size = 0.8, color = "blue", linetype = 2) +
labs(title = "My plot of Heat-Related ER Visits in CO") +
theme(plot.title = element_text(size = 20))
```
Expand All @@ -511,7 +515,8 @@ The `theme()` function can help you modify various elements of your plot. Here w
```{r, fig.width=5, fig.height=3, fig.align='center'}
ggplot(er_state, aes(x = year, y = rate)) +
geom_point(size = 5, color = "green", alpha = 0.5) +
geom_line(size = 0.8, color = "blue", linetype = 2) + labs(title = "My plot of Heat-Related ER Visits in CO") +
geom_line(size = 0.8, color = "blue", linetype = 2) +
labs(title = "My plot of Heat-Related ER Visits in CO") +
theme(plot.title = element_text(hjust = 0.5, size = 20))
```
Expand All @@ -521,7 +526,8 @@ ggplot(er_state, aes(x = year, y = rate)) +
```{r, fig.width=5, fig.height=3, fig.align='center'}
ggplot(er_state, aes(x = year, y = rate)) +
geom_point(size = 5, color = "green", alpha = 0.5) +
geom_line(size = 0.8, color = "blue", linetype = 2) + labs(title = "My plot of Heat-Related ER Visits in CO") +
geom_line(size = 0.8, color = "blue", linetype = 2) +
labs(title = "My plot of Heat-Related ER Visits in CO") +
theme(plot.title = element_text(hjust = 0.5, size = 20),
axis.title = element_text(size = 16))
```
Expand Down

0 comments on commit f4c8c50

Please sign in to comment.