[Rd] Re: RFC: package pixmap
Agustin Lobo
alobo@ija.csic.es
Thu, 4 Oct 2001 14:29:58 +0200 (MET DST)
On Thu, 4 Oct 2001, Friedrich Leisch wrote:
>
> You have 900 columns and only 270 rows, hence you should have a
> vertical rectangle that is approx. 3 times as wide as high.
>
> The difference to calling image() on a matrix is deliberate: if you
> store a picture as a matrix (as usual), then you'd expect element 1,1
> of that matrix to correspond to the upper left corner. That is
> different from what image() does, because it was designed for doing
> the right thing for matrices produced by, e.g., outer() ... [at least
> I think that's the reason for image() rotating the matrix].
I agree with the point that the upper left corner must be the
1,1 cell in the matrix for a "natural" display of the matrix
as an image. But this does not mean that the matrix should be rotated.
In all image processing packages that I know of, an image with
200 cols and 100 rows is displayed as a horizontal rectangle. Note
that, if there is geometric correction to a geographic projection,
the columns go W to E as left to right and the rows N to S as
top to bottom. In fact,
the "natural" display should follow the same geometry than print,
i.e.,
> matrix(1:12,ncol=6,nrow=2)
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 1 3 5 7 9 11
[2,] 2 4 6 8 10 12
>
should be displayed as a horizontal rectangle.
Of course you can do it as you want because this is your package,
but are you sure that you want it the way it is?
Regards,
Agus
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._