if (FALSE) {
# Read the coordinates of the areas in the Antares interface, then convert it
# in a map layout.
layout <- readLayout()
ml <- mapLayout(layout)
# Save the result for future use
save(ml, file = "ml.rda")
# Plot the network on an interactive map
plot(ml)
# change style
plot(ml, colAreas = gray(0.5), colLinks = "orange")
# Use polar area charts to represent multiple values for each area.
nareas <- nrow(ml$coords)
fakeData <- matrix(runif(nareas * 3), ncol = 3)
plot(ml, sizeAreas = fakeData)
# Store the result in a variable to change it with functions from leaflet
# package
library(leaflet)
center <- c(mean(ml$coords$x), mean(ml$coords$y))
p <- plot(ml)
p %>%
addCircleMarker(center[1], center[2], color = "red",
popup = "I'm the center !")
}
Run the code above in your browser using DataLab