I want to produce multiple graphs of a time series xts object in different windows. The issue is that I cannot add only one legend (for the last plot). My code is the following:
dev.new(width=3,height=9)
par(mfrow=c(3,1))
plot(csum_GVMP[,c(-2,-3)],main=" ",minor.ticks="years",cex.axis = 1,major.ticks="years",grid.ticks.on=FALSE,grid.ticks.lty=0,col=color)
addLegend("bottomleft",legend.names = c("","","","","","",""))
plot(csum_ERC[,c(-2,-3)],main=" ",minor.ticks="years",cex.axis = 1,major.ticks="years",grid.ticks.on=FALSE,grid.ticks.lty=0,col=color)
addLegend("bottomleft",legend.names = c("","","","","","",""))
plot(csum_MD[,c(-2,-3)],main=" ",minor.ticks="years",cex.axis = 1,major.ticks="years",grid.ticks.on=FALSE,grid.ticks.lty=0,col=color)
As you see I added blank values for the legend names for the 1st and 2nd plot, but the results is that the graphs are of the same plot are being repeated two times like these: showing only the plot for the csum_GVMP
here
Otherwise if I leave the addLegend out the plot looks like this here,
which is what I want but now I would like to add only one legend. If I leave out the command addLegend for 1st and 2nd plot, the figures are not even plotted. Does it anybody know how to handle this? Thank you in advance.