I am trying to display ggplot on top of ggmap.
library(patchwork)
ggmap(seoul) + ggplot(data = install_time_df) +
geom_point(aes(x = long, y = lat, size = capa_sum),
color = "black", alpha = 0.55)
I have tried patchwork library, but it displays them side by side not overlaying on the same display.
Without patchwork, I get the following error message:
Error : Can't add
gg_heat
to a ggplot object. Runrlang::last_error()
to see where the error occurred.
You can use something like following
ggmap(seoul) +
geom_point(data = install_time_df, aes(x = long, y = lat, size = capa_sum),
color = "black", alpha = 0.55)