s-news
[Top] [All Lists]

Re: Graphsheet & Image.palette

To: David L Lorenz <lorenz@usgs.gov>
Subject: Re: Graphsheet & Image.palette
From: "Fowler, Mark" <FowlerM@mar.dfo-mpo.gc.ca>
Date: Tue, 27 May 2008 11:32:36 -0300
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <OF09F6B8F0.21F05D89-ON86257456.004BD811-86257456.004C2CA7@usgs.gov>
Thread-index: AcjAAN9UviEBtRaTQdKm1jyNClONoQAAzGKg
Thread-topic: [S] Graphsheet & Image.palette
Thanks to David Lorenz and Karen Byron. Dave, I expect you are using an earlier version of S-Plus than 8. I simply reran the syntax in version 7 and it worked just fine for me as well. Karen figured I was using version 8, and suggested use.legacy.graphics(T). I expect this would have worked, but running image on an interp object failed. I'm not certain this was a typical error, I may have broken something in the 8 environment with my thrashing. At any rate I think I'll continue with ver 7, and thank you very much for the help.
 

      Mark Fowler
      Population Ecology Division
      Bedford Inst of Oceanography
      Dept Fisheries & Oceans
      Dartmouth NS Canada
      B2Y 4A2
      Tel. (902) 426-3529
      Fax (902) 426-9710
      Email fowlerm@mar.dfo-mpo.gc.ca
      Home Tel. (902) 461-0708
      Home Email mark.fowler@ns.sympatico.ca

 


From: David L Lorenz [mailto:lorenz@usgs.gov]
Sent: May 27, 2008 10:52 AM
To: Fowler, Mark
Subject: Re: [S] Graphsheet & Image.palette


Mark,
  I copied your graphsheet call, pasted it into S-PLUS and it worked for me. To prove to myself that it worked, I entered image(matrix(1:100, ncol=10)) and got an image grading from blue through green and then to red going from the bottom row to the top row.
Dave



"Fowler, Mark" <FowlerM@mar.dfo-mpo.gc.ca>
Sent by: s-news-owner@lists.biostat.wustl.edu

05/23/2008 01:05 PM

To
s-news@lists.biostat.wustl.edu
cc
Subject
[S] Graphsheet & Image.palette





Hello,
       
Seemed straightforward, but couldn't find the answer in the archives (S or R). I want to use a custom color scheme for plotting images (programmatically, not interactively), for example

graphsheet(num.image.colors = 3, num.image.shades = "50,50",
   image.color.table = "0,0,255|0,255,0|255,0,0")

image(xyzobj,zlim=c(0,30), na.rm=T)

        However the resulting graph just uses whatever color scheme exists in image.palette, and image.palette is unaffected by the graphsheet command. Anybody know how to accomplish this? Or maybe a way to derive an image.palette from graphsheet or graphsheet-style specifications (I dread using the names).

Mark Fowler
Population Ecology Division

Bedford Inst of Oceanography

Dept Fisheries & Oceans

Dartmouth NS Canada

B2Y 4A2

Tel. (902) 426-3529

Fax (902) 426-9710

Email fowlerm@mar.dfo-mpo.gc.ca

Home Tel. (902) 461-0708

Home Email mark.fowler@ns.sympatico.ca

<Prev in Thread] Current Thread [Next in Thread>