En raison du déménagement des baies serveurs, les services gitlab.irstea.fr et mattermost.irstea.fr seront interrompus le samedi 2 octobre 2021 au matin. Ils devraient revenir à la normale dans la journée.

Commit 57de9d9e authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.6.29 NEW: ShinyGR can export the diagram plot

parent 06dcc343
Package: airGRteaching
Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.6.28
Date: 2019-04-25
Version: 0.2.6.29
Date: 2019-05-02
Authors@R: c(
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@irstea.fr"),
person("Laurent", "Coron", role = c("aut"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -14,12 +14,17 @@ output:
### 0.2.6.28 Release Notes (2019-04-25)
### 0.2.6.29 Release Notes (2019-05-02)
#### Bug fixes
- <code>ShinyGR()</code> can export the csv table again. It was broken due to modifications to the version 1.2.13.16 of the airGR package
#### User-visible changes
- it is now possible to export the diagram plot of the model from the <code>ShinyGR()</code> interface
____________________________________________________________________________________
......@@ -205,7 +210,7 @@ ________________________________________________________________________________
- it is now possible to show the table of the last simulation criteria in the <code>ShinyGR()</code> interface
- it is now possible to export state variable plot from <code>ShinyGR()</code> interface
- it is now possible to export state variable plot from the <code>ShinyGR()</code> interface
____________________________________________________________________________________
......
......@@ -698,10 +698,10 @@ shinyServer(function(input, output, session) {
# OutputsModel2 <- sapply(OutputsModel[seq_len(which(names(OutputsModel) == "Qsim"))], function(x) x[IndPlot])
# OutputsModel2 <- c(OutputsModel2, Qobs = list(getSim()$SIM$Qobs[IndPlot]))
OutputsModel2 <- getData()$OutputsModel
# OutputsModel2 <- getData()$OutputsModel
par(getPlotPar()$par)
try(.DiagramGR(OutputsModel = OutputsModel2, Param = getSim()$PARAM,
try(.DiagramGR(OutputsModel = getData()$OutputsModel, Param = getSim()$PARAM,
SimPer = input$Period, EventDate = input$Event,
HydroModel = input$HydroModel, CemaNeige = input$SnowModel == "CemaNeige"),
silent = TRUE)
......@@ -900,6 +900,18 @@ shinyServer(function(input, output, session) {
lines(data$DatesR, data$Qsim, lwd = 1, col = "orangered")
lines(data$DatesR, data$Qobs, lwd = 1, col = par("fg"), type = "o", pch = 20, cex = 0.5)
mtext(text = PngTitle, side = 3, outer = TRUE, cex = 0.8, line = 0.7)
box()
dev.off()
}
if (getPlotType() == 4) {
isCN <- input$SnowModel == "CemaNeige"
png(filename = file, width = 550*k, height = ifelse(isCN, 1000, 900)*k, pointsize = 12, res = 150)
PngTitle2 <- gsub(", C1", "\nC1", PngTitle)
par(oma = c(0, 0, ifelse(isCN, 7, 6), 0))
.DiagramGR(OutputsModel = getData()$OutputsModel, Param = getSim()$PARAM,
SimPer = input$Period, EventDate = input$Event,
HydroModel = input$HydroModel, CemaNeige = input$SnowModel == "CemaNeige")
mtext(text = PngTitle2, side = 3, outer = TRUE, cex = 1.2, line = ifelse(isCN, -0.15, 0.6))
dev.off()
}
}
......
......@@ -168,10 +168,10 @@ navbarPage(title = div("airGRteaching",
choices = c("No", "Yes"), inline = TRUE),#),
downloadButton("DownloadTab" , label = "Download sim. as csv",
style = "color:#565656; background-color:#ECF0F1; border-color:#DCDCDC; width:170px; height:25px; font-size:95%; padding-top:2px; margin-top:20px;"),
conditionalPanel(condition = "input.PlotType == 'Model performance' || input.PlotType == 'Flow time series' || input.PlotType == 'State variables'",
#conditionalPanel(condition = "input.PlotType == 'Model performance' || input.PlotType == 'Flow time series' || input.PlotType == 'State variables'",
downloadButton("DownloadPlot", label = "Download plot as png",
style = "color:#565656; background-color:#ECF0F1; border-color:#DCDCDC; width:170px; height:25px; font-size:95%; padding-top:2px; margin-top:10px;")
)
#)
)
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment