[R-sig-Geo] Legend in density plot
Albin Blaschka
albin.blaschka at standortsanalyse.net
Fri Nov 18 09:13:54 CET 2011
Dear list!
I have GPS data for three seasons of roaming livestock and to get an
idea which areas the animals occupied and the differences between the
seasons, I am plotting density plots for each season like this:
posi <- readOGR(dsn = "PG:host=127.0.0.1 user=user dbname=mydb
password=secret, layer = "mylayer")
pposi <- ppp(posi at coords[,1],
posi at coords[,2],xrange=c(posi at bbox[1,1],posi at bbox[1,2]),
yrange=c(posi at bbox[2,1],posi at bbox[2,2]))
densi <- density(pposi, bw = "nrd0", adjust = 0.1, kernel =
c("epanechnikov"), edge = TRUE, diggle=TRUE)
plot(densi, col = mypalette)
so far, so good:
BUT as there where differences between the years, the legend which is
plotted on the left of each map shows different values/ has different
ranges, which is bad for a comparision, so my question is:
How can I change the range and the ticks in the legend of a density map?
I hope I made my point clear - Thank you in advance!
regards,
Albin
--
| Albin Blaschka, Mag.rer.nat.
| Etrichstrasse 26, A-5020 Salzburg
| * www.albinblaschka.info * www.thinkanimal.info *
| - It's hard to live in the mountains, hard but not hopeless!
More information about the R-sig-Geo
mailing list