Skip to content

Fix extreme values on legend

2 messages · Jue Lin-Ye, Edzer Pebesma

#
Greetings!

I have been using spplot to draw maps of the NW Mediterranean and
sub-regions. I would like to compare them, so I need the same range of
values to be displayed on the legends. I know that I can manually fix the
*colors*, but I do not know if I can fix the extreme *values* on spplot (I
know that I can do so with image.plot, but it is not what I desire).

Thank you in advance!
#
You can use the at argument, as in

spplot(obj, at = c(0,1,2,3))

to specify the values at which colours change. Its range determines the
value range.
On 10/14/2014 12:56 PM, Jue Lin-Ye wrote: