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
d882c27b
Commit
d882c27b
authored
Jul 13, 2017
by
unknown
Browse files
v0.1.3.10 dyplot.default minor syntax revision
parent
48dd338e
Changes
2
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
d882c27b
Package: airGRteaching
Type: Package
Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Application)
Version: 0.1.3.
9
Date: 2017-0
6-22
Version: 0.1.3.
10
Date: 2017-0
7-13
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.8.0)
Imports: xts, dygraphs, shiny, plotrix, markdown
...
...
R/dyplot.default.R
View file @
d882c27b
...
...
@@ -41,8 +41,9 @@ dyplot.default <- function(x, col.Precip = "royalblue", col.Q = c("black", "oran
valueRange
=
range
(
data.xts
[,
grep
(
"^Q"
,
colnames
(
data.xts
))],
na.rm
=
TRUE
)
*
c
(
0.01
,
1.59
))
graphOut
<-
dyAxis
(
dygraph
=
graphOut
,
name
=
"y2"
,
label
=
ylab
[
2L
],
independentTicks
=
FALSE
,
valueRange
=
rev
(
range
(
data.xts
[,
"Precip"
],
na.rm
=
TRUE
)
*
c
(
0.01
,
2.99
)))
graphOut
<-
dySeries
(
dygraph
=
graphOut
,
tail
(
grep
(
"^Q"
,
colnames
(
data.xts
),
value
=
TRUE
),
1
),
axis
=
'y'
,
color
=
col.Q
[
seq_along
(
grep
(
"^Q"
,
colnames
(
data.xts
)))])
graphOut
<-
dySeries
(
dygraph
=
graphOut
,
"Precip"
,
axis
=
'y2'
,
stepPlot
=
TRUE
,
fillGraph
=
TRUE
,
color
=
col.Precip
)
graphOut
<-
dySeries
(
dygraph
=
graphOut
,
name
=
"Qobs"
,
drawPoints
=
TRUE
)
graphOut
<-
dySeries
(
dygraph
=
graphOut
,
name
=
tail
(
grep
(
"^Q"
,
colnames
(
data.xts
),
value
=
TRUE
),
1
),
axis
=
'y'
,
color
=
col.Q
[
seq_along
(
grep
(
"^Q"
,
colnames
(
data.xts
)))])
graphOut
<-
dySeries
(
dygraph
=
graphOut
,
name
=
"Precip"
,
axis
=
'y2'
,
stepPlot
=
TRUE
,
fillGraph
=
TRUE
,
color
=
col.Precip
)
# if (ModelPeriod) {
# graphOut <- dyShading(dygraph = graphOut, from = x$PeriodModel$WarmUp[1L], to = x$PeriodModel$WarmUp[2L], color = "orangered")
# graphOut <- dyShading(dygraph = graphOut, from = x$PeriodModel$Run[1L] , to = x$PeriodModel$Run[2L] , color = "blue")
...
...
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