summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-01-07 20:10:14 +0530
committerSuraj Yerramilli2016-01-07 20:10:14 +0530
commitdd02540c48c1dea49b72711e443f294f47fc936f (patch)
tree97eb450806a2d605d8e469b70bbedfe09ee67111
parent44ad32758d76e6cce34e80bdc2ae487267730db3 (diff)
downloadSysID-R-code-dd02540c48c1dea49b72711e443f294f47fc936f.tar.gz
SysID-R-code-dd02540c48c1dea49b72711e443f294f47fc936f.tar.bz2
SysID-R-code-dd02540c48c1dea49b72711e443f294f47fc936f.zip
fixed legend labels
-rw-r--r--R/predict.R5
1 files changed, 3 insertions, 2 deletions
diff --git a/R/predict.R b/R/predict.R
index 37e17c2..76f34fb 100644
--- a/R/predict.R
+++ b/R/predict.R
@@ -102,7 +102,7 @@ compare <- function(data,nahead=1,...){
Y <- sapply(dots,predict,newdata=data,nahead=nahead)
nrmse <- sapply(dots,FUN = function(x) fitch(x)$FitPer)
- colnames(Y) <- paste(as.character(input_list),paste(round(nrmse,2),"%",sep=""),
+ temp <- paste(as.character(input_list),paste(round(nrmse,2),"%",sep=""),
sep=": ")
df <- data.frame(Time = as.numeric(time(data)),
Actual=as.numeric(outputData(data)[,1]),Y)
@@ -110,5 +110,6 @@ compare <- function(data,nahead=1,...){
ggplot(meltdf,aes(x=Time,y=value,color=variable,group=variable))+geom_line(size=1)+
ggtitle(paste("Comparison with model predictions",nahead,"step(s) ahead"))+
- theme_bw()+ylab(outputNames(data)) + labs(colour="") + scale_colour_hue(l=50)
+ theme_bw()+ylab(outputNames(data)) + labs(colour="") +
+ scale_colour_hue(labels=c("Measured",temp),l=50)
} \ No newline at end of file