Skip to content
Snippets Groups Projects
Commit eae536f8 authored by Ben Anderson's avatar Ben Anderson
Browse files

updated to auto-save high quality graphs for IWA paper

parent b2ccf0c9
Branches
No related tags found
No related merge requests found
......@@ -844,6 +844,13 @@ minY <- min(plotTotalDT[model == "v1_3"]$yminDr)
myDrPlot <- ba_IMPETUSaddDroughtPhases(myPlot, minY, maxY)
myDrPlot
# Figure for IWA Bath final paper (http://ws.iwaponline.com/content/early/2018/02/13/ws.2018.035)
ggsave("Fig4_Compare_sum_model_v1_3.pdf", dpi = 400)
# Grey scale version if required
myDrPlot <- myDrPlot + theme_bw()
ggsave("Fig4_Compare_sum_model_v1_3_gs.pdf", plot = myDrPlot, dpi = 400)
# 2.0 ----
myPlot <- ggplot(plotTotalDT[model == "v2_0"], aes(x = obsDate)) +
geom_ribbon(aes(ymin = yminWE, ymax = ymaxWE, fill = "Baseline 95% CI", group = metered),alpha = 0.5) +
......@@ -935,7 +942,15 @@ myPlot <- ggplot(plotTotalDT[model == "v1_3"], aes(x = obsDate, y = pcSaved, col
maxY <- max(plotTotalDT[model == "v1_3"]$pcSaved)
minY <- 0
ba_IMPETUSaddDroughtPhases(myPlot, minY, maxY)
myPlot <- ba_IMPETUSaddDroughtPhases(myPlot, minY, maxY)
myPlot
# Figure for IWA Bath final paper (http://ws.iwaponline.com/content/early/2018/02/13/ws.2018.035)
ggsave("Fig5_Chart_savings_v1_3_by_month.pdf", plot = myPlot, dpi = 400)
# Grey scale version if required
myPlot <- myPlot + theme_bw()
ggsave("Fig5_Chart_savings_v1_3_by_month_gs.pdf", plot = myPlot, dpi = 400)
myPlot <- ggplot(plotTotalDT[model == "v2_0"], aes(x = obsDate, y = pcSaved, colour = metered)) +
geom_point() +
......
......@@ -785,13 +785,22 @@ plotDT <- rbind(est2013dataFig1DT, mt)
plotDT <- plotDT[, Usage := as.factor(Usage)]
plotDT <- plotDT[, UsageRo := relevel(Usage, "Total")] # put usage at the end
ggplot(plotDT, aes(x=UsageRo, fill = source)) +
myPlot <- ggplot(plotDT, aes(x=UsageRo, fill = source)) +
geom_col(aes(y = vol), position = "dodge") +
labs(title = "Total use (l/day)",
y = "Mean l/day",
x = "Usage") +
coord_flip() # rotate for legibility
myPlot
# Figure for IWA Bath final paper (http://ws.iwaponline.com/content/early/2018/02/13/ws.2018.035)
ggsave("Fig2_CompareWithEST.pdf", plot = myPlot, dpi = 400)
# Grey scale version if required
myPlot <- myPlot + theme_bw()
ggsave("Fig5_Chart_savings_v1_3_by_month_gs.pdf", plot = myPlot, dpi = 400)
```
## Save data
......
......@@ -815,6 +815,13 @@ myPlot <- ggplot(dt, aes(x = factor(currMon), group = metered)
caption = myCaption)
myPlot
# Figure for IWA Bath final paper (http://ws.iwaponline.com/content/early/2018/02/13/ws.2018.035)
ggsave("Fig3_Final_model_v1_3_2012_by_month.pdf", dpi = 400)
# Grey scale version if required
myPlot <- myPlot + theme_bw()
ggsave("Fig3_Final_model_v1_3_2012_by_month_gs.pdf", plot = myPlot, dpi = 400)
```
```{r final model v1_3 2012 all dates}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment