Skip to content

Commit

Permalink
Improved the figure with a vertical line marker and x-axis limits
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam committed Jul 21, 2023
1 parent 7780154 commit f846397
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions vignettes/projecting_incidence.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -327,19 +327,22 @@ ggplot(data = incidence_ts_by_date) +
y = cases
),
color = "black",
size = 1.75,
shape = 21
linewidth = 1
) +
scale_x_continuous(
breaks = seq(
min(incidence_ts_by_date$date),
max(incidence_ts_by_date$date),
10
5
),
labels = seq(
min(incidence_ts_by_date$date),
max(incidence_ts_by_date$date),
10
5
),
limits = c(
min(incidence_ts_by_date$date),
max(incidence_ts_by_date$date) - 4 # for a better visual look
)
) +
scale_y_continuous(
Expand All @@ -354,6 +357,10 @@ ggplot(data = incidence_ts_by_date) +
250
)
) +
labs(x = "Date", y = "Daily cases (median)")
geom_vline(
mapping = aes(xintercept = max(covid19_sa$date)),
linetype = "dashed"
) +

Check warning on line 363 in vignettes/projecting_incidence.Rmd

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=vignettes/projecting_incidence.Rmd,line=363,col=4,[indentation_linter] Indentation should be 2 spaces but is 4 spaces.
labs(x = "Date", y = "Daily cases")
```
## References

0 comments on commit f846397

Please sign in to comment.