2

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. enter image description here

Without patchwork, I get the following error message:

Error : Can't add gg_heat to a ggplot object. Run rlang::last_error() to see where the error occurred.

UseR10085
  • 7,120
  • 3
  • 24
  • 54
user9532692
  • 584
  • 7
  • 28
  • Can you make your question [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)? – UseR10085 May 22 '21 at 06:17

1 Answers1

1

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)
UseR10085
  • 7,120
  • 3
  • 24
  • 54