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

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri, 25 Jan 2008 07:15:28 +0000 (GMT)

You haven't told us where you found image.plot(): it is not part of base R and you cannot expect R-help readers to know the content of every package. At a guess, this is from package 'fields'. See the posting quide for the minimum information that we request for every posting.

I don't think you are talking about an 'axis' at all, but the range of the z values in a legend. If this were an image() plot, you need to set 'zlim', and fields:::image.plot is just a wrapper for image().

On Fri, 25 Jan 2008, mdgi_at_gmx.ch wrote:

> 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
>
>
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help_at_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.
Received on Fri 25 Jan 2008 - 07:18:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jan 2008 - 08:30:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive