From Friedrich.Leisch@ci.tuwien.ac.at  Thu Oct  4 13:02:30 2001
From: Friedrich.Leisch@ci.tuwien.ac.at (Friedrich Leisch)
Date: Thu, 4 Oct 2001 14:02:30 +0200
Subject: [Rd] Re: RFC: package pixmap
In-Reply-To: <Pine.OSF.3.96.1011004135920.19722G-100000@ija.csic.es>
References: <15255.41308.64191.671020@galadriel.ci.tuwien.ac.at>
 <Pine.OSF.3.96.1011004135920.19722G-100000@ija.csic.es>
Message-ID: <15292.20438.705267.252746@galadriel.ci.tuwien.ac.at>

>>>>> On Thu, 4 Oct 2001 14:04:53 +0200 (MET DST),
>>>>> Agustin Lobo (AL) wrote:

  > Hi! I'm testing pixmap. I've found the following:

  >> dim(lissN543)
  > [1] 270 900   3
  >> a <- pixmap(lissN543/255,ncol=900,nrow=270,type="rgb")
  >> dim(a)
  > [1] 270 900   3
  >> 
  >> plot.pixmap(a)

  > ...and I get the image as a vertical rectangle (I was expecting an
  > horizontal rectangle). Is this an error or am I doing something 
  > wrong?

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

Best,
Fritz

-- 
-------------------------------------------------------------------
                        Friedrich  Leisch 
Institut fr Statistik                     Tel: (+43 1) 58801 10715
Technische Universitt Wien                Fax: (+43 1) 58801 10798
Wiedner Hauptstrae 8-10/1071      Friedrich.Leisch@ci.tuwien.ac.at
A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch
-------------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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] Re: RFC: package pixmap
Friedrich Leisch