[R] Stacked plots with common x-axis and different y-axis
jim at bitwrit.com.au
Wed Aug 5 11:42:38 CEST 2009
Jason Rupert wrote:
> Is there a place that shows how to create two plots that are stacked on top of each other where they share a common x-axis scale, but have differnt y-axis scale?
> Say have the following data: airquality
> Stack plot(airquality$Day, airquality$Wind) on top of plot(airquality$Day, airquality$Temp).
> I am interested in stacking the two on top of each other with no seam, or plotting the two lines with two different y-axis scales on the same plot.
Have a look at twoord.plot in the plotrix package.
More information about the R-help