[R] several image.plots with same axis (maximum)

mdgi at gmx.ch mdgi at gmx.ch
Fri Jan 25 07:55:02 CET 2008


Hello R freaks

I have the following problem:

I have several image plots, that need to have the same axis. i want to specify the range from 0 to a maximum value. The problem is, that the axis then only goes to the highest value of the respective plot.
E.g: this is a modified example from the help file "image.plot" z values go until 25. My maximum in plot two is set to 30, so I want the first one to be the same range:

par(mfrow=c(1,2))

x<- 1:10; y<- 1:15; z<- outer( x,y,"+") #define array
whiteblack = colorRampPalette(c("white", "black"), space = "Lab") #color
image.plot(x,y,z, legend.lab="inches",col=whiteblack(30), breaks=seq(0,30,1))   #image.plot with breaks from 0 to 30

x<- 1:10; y<- 1:15; z<- outer( x,y+5,"+") 
whiteblack = colorRampPalette(c("white", "black"), space = "Lab")
image.plot(x,y,z, legend.lab="inches",col=whiteblack(30), breaks=seq(0,30,1))

Thanks a lot for your help


Mike


-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten



More information about the R-help mailing list