Commit 4a6aea3a authored by Jana Ulrich's avatar Jana Ulrich
Browse files

axis in IDF.plot

parent 2f840980
...@@ -122,7 +122,7 @@ IDF.agg <- function(data,ds,na.accept = 0, ...@@ -122,7 +122,7 @@ IDF.agg <- function(data,ds,na.accept = 0,
#' data('example',package = 'IDF') #' data('example',package = 'IDF')
#' fit <- gev.d.fit(example$dat,example$d,ydat = as.matrix(example[,c("cov1","cov2")]) #' fit <- gev.d.fit(example$dat,example$d,ydat = as.matrix(example[,c("cov1","cov2")])
#' ,mul = c(1,2),sigl = 1) #' ,mul = c(1,2),sigl = 1)
#' par <- gev.d.params(fit = fit,cov.list = list(1,1)) #' par <- gev.d.params(fit = fit, ydat = cbind(1,1))
#' IDF.plot(data = example[example$cov1==1,c("dat","d")],fitparams = unlist(par), #' IDF.plot(data = example[example$cov1==1,c("dat","d")],fitparams = unlist(par),
#' calc.dur = 2^(0:5),ylim=c(1,75),st.name = 'Example') #' calc.dur = 2^(0:5),ylim=c(1,75),st.name = 'Example')
IDF.plot <- function(data,fitparams,probs=c(0.5,0.9,0.99),calc.dur=NULL, IDF.plot <- function(data,fitparams,probs=c(0.5,0.9,0.99),calc.dur=NULL,
...@@ -147,7 +147,7 @@ IDF.plot <- function(data,fitparams,probs=c(0.5,0.9,0.99),calc.dur=NULL, ...@@ -147,7 +147,7 @@ IDF.plot <- function(data,fitparams,probs=c(0.5,0.9,0.99),calc.dur=NULL,
# empty plot # empty plot
plot(NA,axes=F,xlim=xlim,ylim=ylim,xlab="Duration [h]",ylab="Intensity [mm/h]",log="xy",...) plot(NA,axes=F,xlim=xlim,ylim=ylim,xlab="Duration [h]",ylab="Intensity [mm/h]",log="xy",...)
box('plot') box('plot')
axis(1,at=calc.dur,labels=calc.dur) axis(1,at=data[,2],labels=round(data[,2],digits = 2))
axis(2) axis(2)
# check if `pch` was passed in ... # check if `pch` was passed in ...
......
...@@ -42,7 +42,7 @@ Plotting of IDF curves at a chosen station ...@@ -42,7 +42,7 @@ Plotting of IDF curves at a chosen station
data('example',package = 'IDF') data('example',package = 'IDF')
fit <- gev.d.fit(example$dat,example$d,ydat = as.matrix(example[,c("cov1","cov2")]) fit <- gev.d.fit(example$dat,example$d,ydat = as.matrix(example[,c("cov1","cov2")])
,mul = c(1,2),sigl = 1) ,mul = c(1,2),sigl = 1)
par <- gev.d.params(fit = fit,cov.list = list(1,1)) par <- gev.d.params(fit = fit, ydat = cbind(1,1))
IDF.plot(data = example[example$cov1==1,c("dat","d")],fitparams = unlist(par), IDF.plot(data = example[example$cov1==1,c("dat","d")],fitparams = unlist(par),
calc.dur = 2^(0:5),ylim=c(1,75),st.name = 'Example') calc.dur = 2^(0:5),ylim=c(1,75),st.name = 'Example')
} }
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