Skip to content

Commit 409123c

Browse files
epi curve inset
1 parent 848759a commit 409123c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

R/viz_plots.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ plot_epicurve <- function(df, type = "cases", by_cat = "WHO Region", legend = "i
133133
legend.background = ggplot2::element_rect(fill = "transparent")
134134
)
135135
}
136-
136+
137137
# -- Add inset plot if requested -------------------
138138
if (inset) {
139139
# Take the max of either 9wks from the latest date
@@ -160,10 +160,10 @@ plot_epicurve <- function(df, type = "cases", by_cat = "WHO Region", legend = "i
160160
g <- g +
161161
patchwork::inset_element(
162162
inset_plot,
163-
left = 0.05, # .5
164-
right = 0.5, # .95
165-
bottom = 0.2, # 0.6
166-
top = 0.6 # 0.95
163+
left = 0.6, # .5
164+
right = 1.0, # .95
165+
bottom = 0.7, # 0.6
166+
top = 1.05 # 0.95
167167
)
168168
} else {
169169
g <- g +
@@ -176,9 +176,9 @@ plot_epicurve <- function(df, type = "cases", by_cat = "WHO Region", legend = "i
176176
)
177177
}
178178

179-
179+
180180
}
181-
181+
182182
return(g)
183183

184184
}

0 commit comments

Comments
 (0)