You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really love your ggiraph package, thanks for making it!!
I'm having trouble getting something to work properly with ggmap(). The interactivity works fine, I can get tooltip response when the mouse is hovered a point, but there seems to be a problem with the scale or axis when using it with ggmap().
I am aware of the geom_map_interactive() function, it is really nice, however I was wanting to use ggmap() with geom_point_interactive(), if I could just solve this scale problem outlined below it would be perfect. I am aware it is probably due to a so mistake on my part.
The code chunks below provide a reproducible example of the problem that I am trying to solve, and there are also some images linked to illustrate what I mean.
First install required packages, then make up small example data set, and then download required map using get_map() function:
However, when I use ggiraph's geom_point_interactive() to make the points in the map react to the user's mouse hover, a problem with the scale or axis occurs:
#Try add reactivity using ggiraph's geom_point_interactive() instead of geom_point()
interactive_map<-ggmap(SOUTH_YARRA) +
geom_point_interactive(data = df,
aes(x =lon, y= lat, size=`Change 2005-2015 (%)`, colour = `Change 2005-2015 (%)`, tooltip=suburb, data_id = suburb),
alpha=0.75) +
scale_colour_gradientn(colours=rainbow(5)) +
scale_radius (range = c(6, 12), trans = "identity", guide = "legend") +
ggtitle("Total change in Median Melbourne \n House Price (%) from 2005-2015 \n")
ggiraph(code = {print(interactive_map)}, zoom_max = 5,
tooltip_offx = 20, tooltip_offy = -10,
hover_css = "fill:black;",
tooltip_opacity = 0.7)
However this has not helped. I've put this question up on stackoverflow but since ggiraph is relatively new there are not yet much on stackoverflow etc for it yet. Any help would be really appreciated!
Cheers
Dan
The text was updated successfully, but these errors were encountered:
Hi David, Hi Mike,
I really love your ggiraph package, thanks for making it!!
I'm having trouble getting something to work properly with ggmap(). The interactivity works fine, I can get tooltip response when the mouse is hovered a point, but there seems to be a problem with the scale or axis when using it with ggmap().
I am aware of the geom_map_interactive() function, it is really nice, however I was wanting to use ggmap() with geom_point_interactive(), if I could just solve this scale problem outlined below it would be perfect. I am aware it is probably due to a so mistake on my part.
The code chunks below provide a reproducible example of the problem that I am trying to solve, and there are also some images linked to illustrate what I mean.
First install required packages, then make up small example data set, and then download required map using get_map() function:
No problem using the code below to create the static map:
here is the static map produced by the code above - no problem
However, when I use ggiraph's geom_point_interactive() to make the points in the map react to the user's mouse hover, a problem with the scale or axis occurs:
here is a still image of my scale/axis problem produced by the code above. Note the the code above makes the tooltip reactivity works fine for mouse hover, it's just this scale problem that I need to resolve
I've tried changing the maprange, extent, and base_layer arguments to the ggmap() function, e.g.:
However this has not helped. I've put this question up on stackoverflow but since ggiraph is relatively new there are not yet much on stackoverflow etc for it yet. Any help would be really appreciated!
Cheers
Dan
The text was updated successfully, but these errors were encountered: