# NOT RUN {
path <- PATH(inlandwaters)
plot(path)
obj <- split(path$path_link_vertex, path$path_link_vertex$path_)
cl <- grDevices::colors()[-1L]
cols <- sample(cl, length(obj), replace = length(obj) > length(cl))
op <- par(mfrow = grDevices::n2mfrow(length(obj)), mar = rep(0, 4))
funplot <- function(ob, vert, col) {
vx <- c("x_", "y_")
plot(dplyr::inner_join(ob, vert, "vertex_")[vx], col = col, type = "l", axes = FALSE)
}
junk <- lapply(seq_along(obj),
function(a) {
funplot(obj[[a]], path$vertex, cols[a])
invisible(NULL)
})
par(op)
# }
Run the code above in your browser using DataLab