From J.C.Rougier@durham.ac.uk  Fri Apr  7 17:04:17 2000
From: J.C.Rougier@durham.ac.uk (Jonathan Rougier)
Date: Fri, 7 Apr 2000 17:04:17 +0100 (BST)
Subject: [Rd] Strange behaviour of image (PR#510)
In-Reply-To: <x21z4jnk1b.fsf@blueberry.kubism.ku.dk>
Message-ID: <Pine.GSO.4.20.0004071656130.15072-100000@laplace>

Hi Peter,

On 6 Apr 2000, Peter Dalgaard BSA wrote:

> J.C.Rougier@durham.ac.uk writes:
> 
> > The following commands
> > 
> > z <- matrix(seq(0, 1, len=1000))
> > image(z, 1, z, zlim=c(0, 1), col=gray(1:10/10))
> > 
> > appear to violate the image functionality as described on the
> > help page.  As I understand it, by specifying a zlim of c(0, 1)
> > and a colour vector of length 10, the colours should correspond
> > to the intervals (0, 0.1), (0.1, 0.2), ..., (0.9, 1.0), this
> > being 10 equally-spaced intervals on (0, 1).  It is clear from
> > the image that this has not occurred.  In fact the intervals are
> > apparently (0, 1/18), (1/18, 3/18), ..., (15/18, 17/18), (17/18,
> > 1).  Have I misunderstood something?
> 
> I don't see that anything else is being promised...
> 
> If someone actually thought about this, then the choice might be
> related to the behavior at peaks and troughs. (since a circle with
> radius r looks wide compared to the region between two circles with
> diameter n*r and (n+1)*r)

I'm not quite sure I follow.  My feeling is that the displayed behaviour
of image is unreasonable, and, I hazard, not what most people who use
image expect.  I think the default behaviour of image should be to give
colour bands of equal widths, and, if I may append to the wish list, I
woud like to be able to specify a "breaks" argument to have unequal widths
should I so choose.

Cheers, Jonathan.

Jonathan Rougier                       Science Laboratories
Department of Mathematical Sciences    South Road
University of Durham                   Durham DH1 3LE
http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Strange behaviour of image (PR#510)
Jonathan Rougier