[R-sig-Geo] Scales in "bubble" {sp}
Steinbuch, Luc
luc.steinbuch at wur.nl
Tue Jun 2 18:10:24 CEST 2015
Hi,
I would like to have nice scales with 'ºN' etc. in a bubble plot.
Example:
###################
library(sp)
### example dataset
sp_yield = new("SpatialPointsDataFrame"
, data = structure(list(Yw = c(6.6, 6, 7.7, 4.4, 7.4)), .Names = "Yw", row.names = c(NA, 5L), class = "data.frame")
, coords.nrs = numeric(0)
, coords = structure(c(9.817, 6.017, -4.317, -0.137, -0.867, 10.283, 9.1, 11.167, 12.974, 10.8), .Dim = c(5L, 2L), .Dimnames = list(NULL,
c("Longitude_dd", "Latitude_dd")))
, bbox = structure(c(-4.317, 9.1, 9.817, 12.974), .Dim = c(2L, 2L), .Dimnames = list(
c("Longitude_dd", "Latitude_dd"), c("min", "max")))
, proj4string = new("CRS"
, projargs = "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
)
)
### with spplot (and this datum, and this area in sp_yield) automatically nice scales are generated,
# with degrees North and degrees East:
spplot(sp_yield,
zcol = "Yw",
scales = list(draw = TRUE)
)
### .. with bubble however not:
bubble(sp_yield,
zcol = "Yw",
scales = list(draw = TRUE)
)
###################
Any ideas..?
Luc
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list