-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Scaling of maps is not even when using facet_wrap.
Reproducible with the code below:
library(maps)
library(ggplot2)
library(plotly)
map <- map_data("world")
d <- as.data.frame(seq(1,25))
d$value <- sample(c(1:10), 25, replace=T)
d$lat <- sample(c(1:90), 25, replace=T)
d$lon <- sample(c(1:180), 25, replace=T)
d$season <- sample (c('Spring', 'Summer','Fall', 'Winter'), size=25, replace=T)
p <- ggplot() +
geom_polygon(data=map, aes(x=long, y=lat, group=group), colour="grey", fill="light grey") +
geom_point(data=d, aes(x=lon, y=lat, size=value), alpha=I(0.7)) +
facet_wrap( ~ season, ncol=2)
fig <- ggplotly(p)
fig
Thanks!
Metadata
Metadata
Assignees
Labels
No labels
