Dear list, My query follows on from a question I posted a few days ago. I have the following 2 sets of data: wetMeans[1] 9.904762[2] 6.344828[3] 6.346154[4] 6.855769[5] 9.074324[6] 9.953988[7] 13.482966[8] 14.546053[9] 10.841584[10] 9.752033[11] 6.739336[12] 8.955056burnMeans[1] 0.06214286[2] 0.05396552[3] 0.04096154[4] 0.05302885[5] 0.05831081[6] 0.07392638[7] 0.29969940[8] 0.25596217[9] 0.09316832[10] 0.14441057[11] 0.13180095[12] 0.05348315 which I am trying to plot on the same graph. I wish to plot the variable "wetMeans" as bars and overlay "burnMeans" as a line, using the same x-axis (there are 12 observations in each set, corresponding to the months of the year) but different y-axes. I have produced the following code which addresses my previous issue (aligning the centre of each bar and the points of the line plot); my problem now relates to the 2nd y-axis (which is being used for the burnMeans data): library(plotrix) par(oma=c(1,1,1,1))par(las=1) xvals <- barp(wetMeans, xlab="", ylab="", main="TEST", col="grey", names.arg=c("Jan","Feb","Mar","Apr","May", "Jun","Jul","Aug","Sep","Oct","Nov","Dec"), staxx=T, cylindrical=T, srt=45) par(new=T) plot(xvals$x,burnMeans, xaxt="n", yaxt="n", xlab="", ylab="", type="b", cex=1, pch=16, lty=44, col="black", lwd=1.5) axis(4, pretty(c(0,max(burnMeans)),n=4)) As you can see when you plot the data, the 2nd y-axis does not have an origin at 0. From a quick inspection of the graph it appears that the scale of the 2nd y-axis is such that the 0 marker would not fit on the grid. My question is therefore if there is a method by which I can shift the line plot (burnMeans) upwards, so that both plotted data sets have their respective y-axes beginning at 0. Many thanks in advance,Andy [[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.