Hi, Im plotting timeSeries and I would like to include a dollar sign to the
values on the y axis. It seems imposible to have factors for the data part
of a timeSeries object and I just can't find the right way to use "paste" in
the labels argument of the axis function.
here's a look at my code, please, any help would eb appreciated.
par(oma=c(2,0,0,5))
tmp1<-seriesMerge(tmp,tmp[(nrow(tmp)-39):nrow(tmp)],tmp2,tmp2[(nrow(tmp2)-39):nrow(tmp2)],pos="union")
datesTick<-match(c(1980,1990,2000,2008,2016),years(tmp1@positions))
plot(tmp1[,3:4]*100,reference.grid=F,plot.args=list(col=c(orange,3),lwd=2),axes=F)
axis(2,ticks=F,las=1)
key(0.25,-5.5,text=c("PIB en PPP per capita","Croissance du PIB per
capita"),lines=list(col=c(bleu,orange),lwd=2))
par(new=T)
plot(tmp1[,1:2],plot.args=list(col=c(tonbleu2,bleu),lwd=c(2,4)),reference.grid=F,axes=F)
axis(4,ticks=F,las=2,labels=log(tmp1[,1]))
axis(1,at=datesTick/nrow(tmp1),labels=years(tmp1@positions[datesTick])
,ticks=F)
--
View this message in context:
http://www.nabble.com/have-currencies-on-one-axis-for-a-plot.timeSeries-tp14297840p14297840.html
Sent from the S-News mailing list archive at Nabble.com.
|