[R] A newbye question : Creating a grey palette

Arne Henningsen ahenningsen at email.uni-kiel.de
Tue Oct 5 10:24:16 CEST 2004


On Monday 04 October 2004 20:04, Mike Prager wrote:
> At 11:09 AM 10/04/2004, you wrote:
> >Hi all
> >
> >I'd like to create a grey palette for a filled.contour()
> >from blank (smallest values) to black (large values)
>
> I have used somethig like this with bar plots:
>
> colvec <- gray(sqrt(seq(from=0.05, to=1.0, length=ncolor)))
>
> That will save a color palette in colvec for use in your call.
>
> MHP

Another option is the package "RColorBrewer":
> library(RColorBrewer)
> colvec <- brewer.pal( 5, "Greys" )

BTW: If you start a new thread, please do not reply to an another email with a 
different subject/thread. This confuses email clients and web archives (see  
https://stat.ethz.ch/pipermail/r-help/2004-October/thread.html#57024)

Best wishes,
Arne

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
ahenningsen at agric-econ.uni-kiel.de
http://www.uni-kiel.de/agrarpol/ahenningsen/




More information about the R-help mailing list