[R-sig-Geo] plotting kernel density estimations

Roger Bivand Roger.Bivand at nhh.no
Wed Oct 24 09:52:57 CEST 2007


On Wed, 24 Oct 2007, Eva Kaiserseder wrote:

>
> Dear List, thank you for your last reply! Sorry, but here's another 
> one.I've 4 Kernel Density Estimations (with splancs: spkernel2d()) and 
> want to plot them altogether (2x2).In this case the spplot-function 
> doesn't work very well, because only one legend/range of value grouping 
> is possible.Also the par(mfrow=c(2,2) and layout(matrix(c(1,2,3,4), 2, 
> 2)) doesn't work and plots only one over all subplots.Any suggestions? 
> Best regardsEva--

(Please do not use HTML in your postings, just plain text)

Do not combine par(mfrow=c()) and layout() - use either one or the other 
unless you actually want to mix them up. Using par(mfrow=c()) should be 
sufficient. In fact, if your density maps are for the same variable but 
with different bandwidths, you need to look at the at=, cuts=, and/or 
col.regions= arguments to spplot(). If for different variables, then your 
choice of par(mfrow=c()) looks OK.

Roger

>
> _________________________________________________________________
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list