From: Jonathan Rougier (J.C.Rougier@durham.ac.uk)
Date: Sat 13 Nov 1999 - 22:53:20 EST
May I raise the issue of the behaviour of image()? In image() dim(z) is
supposed to be c(length(x), length(y)). This suggests that the user is
supplying the midpoints of the rectangles. For all but the outer
rectangles this is true. The outer rectangles, however, are only
displayed in half width. So it is not possible to show correctly an image
plot of equally-spaced abscissa. I would hazard a guess that these kinds
of plots make up the bulk of calls to image() either directly or after a
simple transformation (eg starting with boundary values rather than
Can I suggest that the code for image() be modified to show full
rectangles for all values on the basis that x and y are midpoints?
According to my code for R (which is a bit out of date!) the minimum
change would require 4 lines to be modified in the function do_image of
plot3d.c. The alternative, which I think would be more transparent, would
be to call the function do_image with boundary values having previously
made the appropriate calculations in image() according to whether
midpoints or boundary values are supplied. Something like this happens in
S+ (although not very transparently!).
I would be happy to detail these changes if they were thought appropriate.
Jonathan Rougier Science Laboratories
Department of Mathematical Sciences South Road
University of Durham Durham DH1 3LE
"[B]egin upon the precept ... that the things we see are to be
weighed in the scale with what we know" (Meredith, 1879, The Egoist)
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: email@example.com
This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:10 EST