[R-sig-Geo] upper bounds for values in color scale in spplot

Edzer J. Pebesma edzer.pebesma at uni-muenster.de
Fri Oct 12 13:38:57 CEST 2007


Brad, you might want to try to construct one spplot per column, having 
the scale perhaps horizontally on the bottom, and combing them using the 
print(..., more = T) on trellis objects (see ?print.trellis in package 
lattice). An issue might be to get the maps at exactly the same scale, 
as the print command addresses the full print object including the 
possibly varying scale/text; I often fought with this but have no solution.
--
Edzer

Brad Christoffersen wrote:
> Dear R mappers,
>
> I'm just getting started with sp and maptools in R, and I have limited
> familiarity with lattice() and how spplot interfaces with lattice() in terms of
> commands.  I would like to know how to keep the range of values represented by a
> color scale on a series of maps constant.
>
> This is the code I'm running that generates 8 maps across 4 rows and 2 columns. 
> You will see that it produces maps that have different upper bounds on the
> respective color scales.  I'm interested in having a constant color scale for
> each group of 4 maps (1 scale for each column of maps that are plotted) based
> on the largest value in the data (or by just prescribing the upper and lower
> bounds with constants).
>
> Any help is much appreciated!
> Thanks,
> Brad C.




More information about the R-sig-Geo mailing list