Re: [R] How to plot raster obtained from readRAST6 in grey scale?

From: Rainer M Krug <r.m.krug_at_gmail.com>
Date: Sun, 09 Mar 2008 12:43:24 +0200

Thanks - I was quite in a rush when writing the question - sorry about that.

But it works now with

image(TheImage, col=gray.colors(10, start=0.9, end=0.3)

On 08/03/2008, Roger Bivand <Roger.Bivand_at_nhh.no> wrote:
> Uwe Ligges <ligges <at> statistik.tu-dortmund.de> writes:
>
> >
> >
> > Rainer M Krug wrote:
> > > Hi
> > >
> > > I have a raster which I would like to plot in a greyscale instead of
> > > colour. Is this possible, and how?
> >
> > Probably, and we may tell you how given you tell us what "raster" means:
> >
> > > ?raster
> > No documentation for 'raster' in specified packages and libraries:
> > you could try 'help.search("raster")'
>
>
> It is possible that this is a spatial object, like a digital picture, so the
> function or method used may have been image(), and the relevant argument was
> col=. It would help greatly if the question was rendered in R:
>
> "I have an object X:
>
> str(X, max.level=1, give.attr=FALSE)
>
> which I would like to plot in a greyscale instead of colour:
>
> image(X)
>
> Which arguments to method "image" should I use?"
>
> However, re-phrasing answers the question to ?image and probably then to "Where
> are greyscale colours?" then to help.search("grey") so to gray.colors?, and
> avoids the posting altogether.
>
> If the method is spplot in package sp, the same would hold. In any case, for
> spatial data (raster is a rather spatial incantation) the R-sig-geo list might
> be more suitable.
>
> Roger
>
> >
> > Uwe Ligges
> >
> > >
> > > Thanks
> > >
> > > Rainer
> > >
> >
> > ______________________________________________
> > R-help <at> r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> >
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT)

Plant Conservation Unit Department of Botany
University of Cape Town
Rondebosch 7701
South Africa

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 09 Mar 2008 - 10:47:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 09 Mar 2008 - 13:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive