[R-sig-Geo] avoid plot frame (bounding box) in spplot

Carson Farmer carson.farmer at gmail.com
Thu Jul 21 15:04:13 CEST 2011

> One way out (since in R there are usually more) is
> trellis.par.set(axis.line=list(col=NA))
> then
> spplot(... etc
Cool, this works nicely...
> but then also the box around the legend dissapears. SOme one one this list
> has sent me code that corrects this bit but I cant seem to be able to find
> it at the moment.
This is indeed a bit of a problem, but for now it will work...
hopefully that someone from the list that sent you the code to correct
this is reading this :-P I'm really surprised this is such a difficult
thing to do... no wonder I keep defaulting to base graphics!



> On Thu, Jul 21, 2011 at 2:35 PM, Barry Rowlingson
> <b.rowlingson at lancaster.ac.uk> wrote:
>> On Thu, Jul 21, 2011 at 12:58 PM, 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?
>>  After trawling through the documentation and delving deep into the
>> labyrinth of code that is trellis, my conclusion is:
>>  save the plot as an SVG and delete the box using Inkscape...
>>  Hopefully someone will have a better option, possibly involving
>> trellis.par.set (but I couldn't find it there).
>> Barry
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,

More information about the R-sig-Geo mailing list