Commit 2d033329 authored by unknown's avatar unknown
Browse files

v1.0.5.22 remove the using of dev.new() in the plot.OutputsModel() when...

v1.0.5.22 remove the using of dev.new() in the plot.OutputsModel() when RStudio is not used because it causes some disorders when airGRteachin uses it in shiny (not plot in the interface when a script is called from Rscript.exe or R.exe)
parent 977eb64b
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.5.21
Date: 2017-02-16
Version: 1.0.5.22
Date: 2017-02-23
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")),
person("Charles", "Perrin", role = c("aut", "ths")),
......
......@@ -104,19 +104,19 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
matlayout <- rbind(matlayout, iPlot+1); iPlot <- iPlot+1; }
iPlotMax <- iPlot;
isRStudio <- Sys.getenv("RSTUDIO") == "1";
if(!isRStudio){
if(Sum1 == 1 & Sum2 == 0){ width = 10; height = 05; }
if(Sum1 == 1 & Sum2 != 0){ width = 10; height = 07; }
if(Sum1 == 2 & Sum2 == 0){ width = 10; height = 05; }
if(Sum1 == 2 & Sum2 != 0){ width = 10; height = 07; }
if(Sum1 == 3 & Sum2 == 0){ width = 10; height = 07; }
if(Sum1 == 3 & Sum2 != 0){ width = 10; height = 10; }
if(Sum1 == 0 & Sum2 == 1){ width = 05; height = 05; }
if(Sum1 == 0 & Sum2 == 2){ width = 10; height = 04; }
if(Sum1 == 0 & Sum2 == 3){ width = 10; height = 03; }
dev.new(width = width, height = height)
}
# isRStudio <- Sys.getenv("RSTUDIO") == "1";
# if(!isRStudio){
# if(Sum1 == 1 & Sum2 == 0){ width = 10; height = 05; }
# if(Sum1 == 1 & Sum2 != 0){ width = 10; height = 07; }
# if(Sum1 == 2 & Sum2 == 0){ width = 10; height = 05; }
# if(Sum1 == 2 & Sum2 != 0){ width = 10; height = 07; }
# if(Sum1 == 3 & Sum2 == 0){ width = 10; height = 07; }
# if(Sum1 == 3 & Sum2 != 0){ width = 10; height = 10; }
# if(Sum1 == 0 & Sum2 == 1){ width = 05; height = 05; }
# if(Sum1 == 0 & Sum2 == 2){ width = 10; height = 04; }
# if(Sum1 == 0 & Sum2 == 3){ width = 10; height = 03; }
# dev.new(width = width, height = height)
# }
layout(matlayout);
Xaxis <- 1:length(IndPeriod_Plot);
......
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