[R-sig-Geo] hide legend in plot raster

Häring, Tim (LWF) Tim.Haering at lwf.bayern.de
Wed Apr 27 08:49:02 CEST 2011


Thank you both. It works fine.
TIM

> -----Original Message-----
> From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-
> project.org] On Behalf Of Robert Hijmans
> Sent: Wednesday, April 27, 2011 6:34 AM
> To: r-sig-geo at r-project.org
> Subject: Re: [R-sig-Geo] hide legend in plot raster
> 
> > I would like to overlay two raster objects to produce a nice map. The
> > underlying raster is a hillshade, the second is transparent.
> > plot(hillshade, col=grey(1:20/20))
> > plot(soilraster, alpha = 0.7, add = TRUE)
> > Does anybody know, how to hide the legend of the hillshade?
> 
> In addition to using Adam's suggestions, you can also have a look at
> the
> example in the raster::hillShade function:
> 
> dem <- getData('alt', country='CHE')
> slas <- slopeAspect(dem)
> hill <- hillShade(slas[[1]], slas[[2]], 40, 270)
> plot(hill, col=grey(0:100/100), legend=FALSE, main='Switzerland')
> plot(dem, col=rainbow(25, alpha=0.35), add=TRUE)
> 
> 
> --
> View this message in context: http://r-sig-
> geo.2731867.n2.nabble.com/hide-legend-in-plot-raster-
> tp6306428p6308140.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list