Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HYCAR-Hydro
airGRteaching
Commits
a8b7afa3
Commit
a8b7afa3
authored
Jan 30, 2018
by
unknown
Browse files
v0.1.11.7 new main managment for plot.CalGR function
parent
d5177a69
Changes
2
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
a8b7afa3
Package: airGRteaching
Type: Package
Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Interface)
Version: 0.1.11.
6
Version: 0.1.11.
7
Date: 2018-01-29
Authors@R: c(person("Olivier", "Delaigue", role = c("aut", "cre"), email = "airGR@irstea.fr"), person("Laurent", "Coron", role = c("aut")), person("Pierre", "Brigode", role = c("aut")), person("Guillaume", "Thirel", role = c("ctb")))
Depends: airGR (>= 1.0.9.43)
...
...
R/plot.CalGR.R
View file @
a8b7afa3
...
...
@@ -5,7 +5,7 @@ plot.CalGR <- function(x, xlab = NULL, ylab = NULL, main = NULL, which = c("per
}
if
(
!
any
(
which
%in%
c
(
"perf"
,
"iter"
,
"ts"
)))
{
stop
(
"Non convenient data for which argument. Must be of class \"perf\", \"iter\" or \"ts\""
)
}
}
nbParamX
<-
.TypeModelGR
(
x
)
$
NbParam
#as.numeric(gsub("\\D", "", x$TypeModel))
nbParamC
<-
ifelse
(
.TypeModelGR
(
x
)
$
CemaNeige
,
2
,
0
)
...
...
@@ -52,7 +52,7 @@ plot.CalGR <- function(x, xlab = NULL, ylab = NULL, main = NULL, which = c("per
ParamLab
$
Label
<-
gsub
(
"TimeUnit"
,
substr
(
.TypeModelGR
(
x
)
$
TimeUnit
,
1
,
1
),
ParamLab
$
Label
)
par
(
mar
=
c
(
2.5
,
3.5
,
4.5
,
1
),
mgp
=
c
(
2.0
,
0.6
,
0
))
par
(
mar
=
c
(
2.5
,
3.5
,
2.0
,
1
.0
),
mgp
=
c
(
2.0
,
0.6
,
0.0
),
oma
=
c
(
0
,
0
,
4
,
0
))
for
(
i
in
seq_len
(
ncol
(
x
$
OutputsCalib
$
HistParamR
)))
{
plot
(
x
$
OutputsCalib
$
HistParamR
[,
i
],
col
=
ifelse
(
grepl
(
"X"
,
nmParam
[
i
]),
"darkorchid3"
,
"darkolivegreen3"
),
...
...
@@ -64,7 +64,11 @@ plot.CalGR <- function(x, xlab = NULL, ylab = NULL, main = NULL, which = c("per
col
=
"tomato"
,
type
=
"b"
,
pch
=
19
,
cex
=
1.0
,
xlab
=
""
,
ylab
=
""
,
main
=
sprintf
(
"Efficiency criteria (%s)\nduring the steepest-descent step"
,
gsub
(
".*_"
,
""
,
x
$
CalCrit
)))
main
=
gsub
(
".*_"
,
""
,
x
$
CalCrit
))
mainIter
<-
"Evolution of parameters and efficiency criterion\nduring the iterations of the steepest-descent step"
title
(
main
=
ifelse
(
is.null
(
main
),
mainIter
,
main
),
outer
=
TRUE
,
line
=
0.6
,
cex.main
=
1.6
)
}
if
(
any
(
which
[
1L
]
%in%
c
(
"ts"
)))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment