Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions modules/data.atmosphere/R/debias_met_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,8 @@ debias.met.regression <- function(train.data, source.data, n.ens, vars.debias=NU
print(
ggplot2::ggplot(data=dat.pred[dat.pred$Year>=mean(dat.pred$Year)-1 & dat.pred$Year<=mean(dat.pred$Year)+1,]) +
ggplot2::geom_ribbon(ggplot2::aes(x=.data$Date, ymin=.data$lwr, ymax=.data$upr, fill="corrected"), alpha=0.5) +
ggplot2::geom_line(ggplot2::aes(x=.data$Date, y=mean, color="corrected"), size=0.5) +
ggplot2::geom_line(ggplot2::aes(x=.data$Date, y=.data$obs, color="original"), size=0.5) +
ggplot2::geom_line(ggplot2::aes(x=.data$Date, y=mean, color="corrected"), linewidth=0.5) +
ggplot2::geom_line(ggplot2::aes(x=.data$Date, y=.data$obs, color="original"), linewidth=0.5) +
ggplot2::scale_color_manual(values=c("corrected" = "red", "original"="black")) +
ggplot2::scale_fill_manual(values=c("corrected" = "red", "original"="black")) +
ggplot2::guides(fill=F) +
Expand All @@ -1058,7 +1058,7 @@ debias.met.regression <- function(train.data, source.data, n.ens, vars.debias=NU
grDevices::png(file.path(path.diagnostics, paste(ens.name, v, "day2.png", sep="_")), height=6, width=6, units="in", res=220)
print(
ggplot2::ggplot(data=stack.sims[stack.sims$Year>=mean(stack.sims$Year)-2 & stack.sims$Year<=mean(stack.sims$Year)+2,]) +
ggplot2::geom_line(ggplot2::aes(x=.data$Date, y=values, color=ind), size=0.2, alpha=0.8) +
ggplot2::geom_line(ggplot2::aes(x=.data$Date, y=values, color=ind), linewidth=0.2, alpha=0.8) +
ggplot2::ggtitle(paste0(v, " - example ensemble members (daily slice)")) +
ggplot2::theme_bw()
)
Expand All @@ -1074,8 +1074,8 @@ debias.met.regression <- function(train.data, source.data, n.ens, vars.debias=NU
print(
ggplot2::ggplot(data=dat.yr[,]) +
ggplot2::geom_ribbon(ggplot2::aes(x=.data$Year, ymin=.data$lwr, ymax=.data$upr, fill="corrected"), alpha=0.5) +
ggplot2::geom_line(ggplot2::aes(x=.data$Year, y=mean, color="corrected"), size=0.5) +
ggplot2::geom_line(ggplot2::aes(x=.data$Year, y=.data$obs, color="original"), size=0.5) +
ggplot2::geom_line(ggplot2::aes(x=.data$Year, y=mean, color="corrected"), linewidth=0.5) +
ggplot2::geom_line(ggplot2::aes(x=.data$Year, y=.data$obs, color="original"), linewidth=0.5) +
ggplot2::scale_color_manual(values=c("corrected" = "red", "original"="black")) +
ggplot2::scale_fill_manual(values=c("corrected" = "red", "original"="black")) +
ggplot2::guides(fill=F) +
Expand Down
4 changes: 2 additions & 2 deletions modules/uncertainty/R/plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ plot_sensitivity <- function(sa.sample, sa.spline, trait, y.range = c(0, 50), me
post.x <- seq(from = min(sa.sample), to = max(sa.sample), length.out = LENGTH_OUT)

saplot <- saplot + ## plot spline function
ggplot2::geom_line(ggplot2::aes(x=.data$x, y=.data$y), data = data.frame(x = post.x, y = sa.spline(post.x)), size = linesize) +
ggplot2::geom_line(ggplot2::aes(x=.data$x, y=.data$y), data = data.frame(x = post.x, y = sa.spline(post.x)), linewidth = linesize) +
## plot points used to evaluate spline
ggplot2::geom_point(ggplot2::aes(x=.data$x, y=.data$y), data = data.frame(x = sa.sample, y = sa.spline(sa.sample)),
size = dotsize) + # indicate median with larger point
Expand All @@ -115,7 +115,7 @@ plot_sensitivity <- function(sa.sample, sa.spline, trait, y.range = c(0, 50), me
prior.x <- seq(from = min(prior.sa.sample), to = max(prior.sa.sample), length.out = LENGTH_OUT)
saplot <- saplot + ## plot spline
ggplot2::geom_line(ggplot2::aes(x = .data$x, y= .data$y), data = data.frame(x = prior.x, y = prior.sa.spline(prior.x)),
size = linesize, color = "grey") + ## plot points used to evaluate spline
linewidth = linesize, color = "grey") + ## plot points used to evaluate spline
ggplot2::geom_point(ggplot2::aes(x= .data$x, y= .data$y), data = data.frame(x = prior.sa.sample, y = prior.sa.spline(prior.sa.sample)),
size = dotsize, color = "grey") + ## indicate location of medians
ggplot2::geom_point(ggplot2::aes(x = .data$x, y= .data$y), data = data.frame(x = prior.sa.sample[median.i], y = prior.sa.spline(prior.sa.sample[median.i])),
Expand Down
4 changes: 2 additions & 2 deletions shiny/ForecastingDashboard/animated_WCr_graphs.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ qle_lower = -50

p <-ggplot(nee.data, aes(group = start_date, ids = start_date, frame = start_date)) + #, label = NEE - Predicted
geom_ribbon(aes(x = Time, ymin=Lower, ymax=Upper, fill="95% Confidence Interval"), alpha = 0.4) +
geom_line(aes(x = Time, y = NEE, color = "Observed Data"), size = 1) +
geom_line(aes(x = Time, y = NEE, color = "Observed Data"), linewidth = 1) +
geom_line(aes(x = Time, y = Predicted, color = "Predicted Mean")) +
ggtitle(paste0("Net Ecosystem Exchange for ", frame_start, " to ", frame_end, ", Willow Creek, Wisconsin")) +
scale_color_manual(name = "Legend", labels = c("Predicted Mean", "Observed Data"), values=c("Predicted Mean" = "skyblue1", "Observed Data" = "firebrick4")) +
Expand All @@ -90,7 +90,7 @@ p <-ggplot(nee.data, aes(group = start_date, ids = start_date, frame = start_dat

q <- ggplot(le.data, aes(group = start_date, ids = start_date, frame = start_date)) + #, label= LE - Predicted
geom_ribbon(aes(x = Time, ymin=Lower, ymax=Upper, fill="95% Confidence Interval"), alpha = 0.4) +
geom_line(aes(x = Time, y = LE, color = "Observed Data"), size = 1) +
geom_line(aes(x = Time, y = LE, color = "Observed Data"), linewidth = 1) +
geom_line(aes(x = Time, y = Predicted, color = "Predicted Mean")) +
ggtitle(paste0("Latent Energy for ", frame_start, " to ", frame_end, ", Willow Creek, Wisconsin")) +
scale_color_manual(name = "Legend", labels = c("Predicted Mean", "Observed Data"), values=c("Predicted Mean" = "skyblue1", "Observed Data" = "firebrick4")) +
Expand Down
2 changes: 1 addition & 1 deletion shiny/ViewMet/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ server <- function(input, output, session) {
p_overlay <- ggplot(rv$plot.data) + geom_line(aes(x=date, y=var, color=met)) +
ylab(input$var) + ggtitle(input$var)

p_facet <- ggplot(rv$plot.data) + geom_line(aes(x=date, y=var, color=met), size=1) +
p_facet <- ggplot(rv$plot.data) + geom_line(aes(x=date, y=var, color=met), linewidth=1) +
ylab(input$var) + ggtitle(input$var) +
facet_grid(met ~ .)

Expand Down
Loading