gr <- somgrid(3, 3, "hexagonal")
x <- list(grid = gr)
class(x) <- "wccsom"
par(mfrow = c(1,2))
unit.dists <- unit.distances(gr, toroidal = FALSE)
plot(x, type = "property", property = unit.dists[1,],
main = "Distances to unit 1", zlim = c(0,2.75), contin = TRUE)
unit.dists <- unit.distances(gr, toroidal = TRUE)
plot(x, type = "property", property = unit.dists[1,],
main = "Toroidal distances to unit 1", zlim = c(0,2.75), contin = TRUE)
Run the code above in your browser using DataLab