diff --git a/html_outputs/new_pages/ggplot_tips.html b/html_outputs/new_pages/ggplot_tips.html index f97d62f4..54208990 100644 --- a/html_outputs/new_pages/ggplot_tips.html +++ b/html_outputs/new_pages/ggplot_tips.html @@ -848,8 +848,8 @@

Import data

The first 50 rows of the linelist are displayed below.

-
- +
+
@@ -1661,7 +1661,7 @@

This also works well with faceting functions - it allows the user to produce facet plots with the background data highlighted that doesn’t apply to the facet! Below we count cases by week and plot the epidemic curves by hospital (color = and facet_wrap() set to hospital column).

-
# produce a histogram of all cases by age
+
# produce a linegraph of all cases by age
 linelist %>% 
   count(week = lubridate::floor_date(date_hospitalisation, "week"),
         hospital) %>% 
@@ -1671,7 +1671,8 @@ 

color = hospital)) + theme_minimal() + gghighlight::gghighlight() + # highlight instances where the patient has died - facet_wrap(~hospital) # make facets by outcome

+ facet_wrap(~hospital) + # make facets by outcome + scale_x_date(labels = date_format("%m/%y"))
@@ -1860,7 +1861,7 @@

  • The epicurve and the line are aggregated into weeks prior to plotting and the date_breaks and date_labels are identical - we do this so that the x-axes of the two plots are the same when they are overlaid.
  • -
  • The y-axis is created to the right-side for plot 2 with the sex_axis = argument of scale_y_continuous().
  • +
  • The y-axis is created to the right-side for plot 2 with the sec_axis = argument of scale_y_continuous().
  • Note there is another example of this technique in the Epidemic curves page - overlaying cumulative incidence on top of the epicurve.

    Make the datasets for the plot
    @@ -2653,7 +2654,7 @@

    -