Skip to content

Commit

Permalink
reordered function calls in ggplot code chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
angelchen7 committed Jun 12, 2024
1 parent 4b5607a commit 130b8d4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions materials/sections/visualization-delta.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,13 @@ ggplot(data = daily_visits_loc,
aes(x = restore_loc, y = daily_visits,
fill = visitor_type))+
geom_col()+
coord_flip()+
scale_y_continuous(breaks = seq(0,120, 20))+
labs(x = "Restoration Location",
y = "Number of Visits",
fill = "Type of Visitor",
title = "Total Number of Visits to Delta Restoration Areas by visitor type",
subtitle = "Sum of all visits during study period")+
coord_flip()+
scale_y_continuous(breaks = seq(0,120, 20))+
my_theme
```
Expand Down Expand Up @@ -499,14 +499,13 @@ ggplot(data = daily_visits_totals,
aes(x = fct_reorder(restore_loc, desc(n)), y = daily_visits,
fill = visitor_type))+
geom_col()+
theme_bw()+
coord_flip()+
scale_y_continuous(breaks = seq(0,120, 20), expand = c(0,0))+
labs(x = "Restoration Location",
y = "Number of Visits",
fill = "Type of Visitor",
title = "Total Number of Visits to Delta Restoration Areas by visitor type",
subtitle = "Sum of all visits during study period")+
coord_flip()+
scale_y_continuous(breaks = seq(0,120, 20), expand = c(0,0))+
my_theme
```
Expand All @@ -529,15 +528,14 @@ ggplot(data = daily_visits_totals,
aes(x = fct_reorder(restore_loc, desc(n)), y = daily_visits,
fill = visitor_type))+
geom_col()+
theme_bw()+
coord_flip()+
scale_y_continuous(breaks = seq(0,120, 20), expand = c(0,0))+
scale_fill_viridis_d()+
labs(x = "Restoration Location",
y = "Number of Visits",
fill = "Type of Visitor",
title = "Total Number of Visits to Delta Restoration Areas by visitor type",
subtitle = "Sum of all visits during study period")+
coord_flip()+
scale_y_continuous(breaks = seq(0,120, 20), expand = c(0,0))+
my_theme
Expand Down Expand Up @@ -571,7 +569,6 @@ facet_plot <- ggplot(data = daily_visits_totals,
aes(x = visitor_type, y = daily_visits,
fill = visitor_type))+
geom_col()+
theme_bw()+
facet_wrap(~restore_loc,
scales = "free_y",
ncol = 5,
Expand Down

0 comments on commit 130b8d4

Please sign in to comment.