[R-sig-Geo] avoid plot frame (bounding box) in spplot
Dennis Murphy
djmuser at gmail.com
Thu Jul 21 21:36:58 CEST 2011
Hi:
Is this what you had in mind?
# library(lattice)
spplot(meuse, zcol = 'zinc',
par.settings = list(axis.line = list(col = 'transparent')))
The par.settings = part comes from the graphical parameters in
lattice. See trellis.par.get('axis.line') to get a list of the
(default) settings; par.settings() allows you to change the defaults
temporarily in the current call. See Chapter 7 of the Lattice book for
more details.
Reproducible examples are a Good Thing :)
HTH,
Dennis
On Thu, Jul 21, 2011 at 4:58 AM, Carson Farmer <carson.farmer at gmail.com> wrote:
> Dear list,
>
> I'm sure there is a simple solution to my question, but I've scoured
> the archives and tried every combination of parameters I can think of,
> and still can't find a solution. All I want to do is 'remove' the
> bounding box around my spplot plots. For those of you who like
> reproducible examples, try the following:
>
> library(lattice)
> data(meuse)
> coordinates(meuse) <- ~x+y
> spplot(meuse, zcol="zinc")
>
> Notice the black box around the plot (with the legend below). How can
> I remove this bounding box?
>
> Thanks in advance,
>
> Carson
>
> P.S.
>
> sessionInfo()
> R version 2.13.1 (2011-07-08)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
> [1] LC_CTYPE=en_IE.utf8 LC_NUMERIC=C
> LC_TIME=en_IE.utf8
> [3] LC_COLLATE=en_IE.utf8 LC_MONETARY=C
> LC_MESSAGES=en_IE.utf8
> [5] LC_PAPER=en_IE.utf8 LC_NAME=C LC_ADDRESS=C
> [8] LC_TELEPHONE=C LC_MEASUREMENT=en_IE.utf8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] grid stats graphics grDevices utils datasets
> methods base
>
> other attached packages:
> [1] maptools_0.8-6 lattice_0.19-30 foreign_0.8-44 rgeos_0.1-4
> stringr_0.4 rgdal_0.6-33
> [7] classInt_0.1-14 e1071_1.5-25 class_7.3-3 sp_0.9-80
> MASS_7.3-13
>
> loaded via a namespace (and not attached):
> [1] plyr_1.5.2 tools_2.13.1
>
> _______________________________________________
> 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