I have the following R code to create a plot with two y axes. I am essentially trying to plot a price series with a volume series on the same graph. (i.e. to compare price with volume). I can label the first y axis successfully, but the problem is in labeling the 2nd y-axis. Essentially, the label never appears. It seems as though there is not enough margin on the right hand side of the figure to contain the axis title. I have tried adjusting the margins, but this just shrinks the graph within the quartz window and the title never appears. Is there some way to adjust the space for text to the right of the secondary y axis?
plot(x1,col="darkviolet", xlim=c(min(Duration),max (Duration)),ylab="Price", type="l", xaxs="i", xaxt="n") axis(2,col.axis="black") par(new=TRUE) plot(x2,col="green", xlim=c(min(Duration),max(Duration)), type="l", ylab="", axes=FALSE ,xaxs="i",xaxt="n", yaxt="n", pch=16, las=1) axis.Date(1,at=seq(as.Date("1986/01/15"),as.Date("2006/10/31"),by="1 years")) axis(4,col.axis="black") text(locator(1), "2nd Y Axis Title", srt = 270, xpd = FALSE) [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.