# Re: R-beta: image

Ben Bolker (ben@eno.Princeton.EDU)
Fri, 9 Jan 1998 16:11:52 -0500 (EST)

```Date: Fri, 9 Jan 1998 16:11:52 -0500 (EST)
From: Ben Bolker <ben@eno.Princeton.EDU>
To: Ross Ihaka <ihaka@stat.auckland.ac.nz>
Subject: Re: R-beta: image

The problem is that R-0.50-a4 has a simplified (mildly buggy) version of
image():

> image
function (x = seq(0, 1, len = nrow(z)), y = seq(0, 1, len = ncol(z)),
z, zlim = range(z, na.rm = TRUE), col = heat.colors(12),
...)
{
plot(0, 0, xlim = range(x, na.rm = TRUE), ylim = range(y,
na.rm = TRUE), type = "n", xaxs = "i", yaxs = "i",
xlab = "", ylab = "", ...)
.Internal(image(as.double(x), as.double(y), as.double(z),
as.double(zlim), col))

--  which doesn't do the right thing with xlab and ylab.
It appears fixed in 0.60, which is what I have: the workaround should be
fine.

On Sat, 10 Jan 1998, Ross Ihaka wrote:

> 	> >>>>> On Wed, 7 Jan 1998 16:40:53 -0600 (CST),
> 	> >>>>> Bill Simpson (BS) wrote:
> 	>
> 	> BS> Questions on image:
> 	> BS> 1) How can I put labels on the x and y axes?
> 	>
> 	> As usually using the xlab and ylab arguments (same as plot)
>
> 	I am using R-0.50-a4  on linux. When I try this I get:
> 	image(x, y, volcano,col=gray(1:32/32),xlab="X", ylab="Y")
> 	Error: formal argument "xlab" matched by multiple actual arguments
>
> 	(Using volcano data as in help page.) What am I doing wrong?
>
> 	Thanks very much for any help.
>
>
> I'm not sure what the problem is (I don't have a R-0.50-a4 handy),
> but here is a quick work around.
>
> After you have created the image plot, you can use use the function
> "title" to add annotation to a plot.
>
> 	image( ... )
> 	title(xlab="xlab here", ylab="ylab here")
>
> Ross
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

Benjamin Bolker          Dep't of Ecology and Evolutionary Biology,
ben@eno.princeton.edu    Princeton University
tel: (609) 258-6886,     fax: (609) 258-1334

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
```