Custom interactive CSS/HTML tooltips with ggplot, shiny and R (ggvis like).Edited
This is very helpful, and works wonderfully! I am reordering the scatterplot in an ascending order in my ggplot. The tooltip however, does not get rearranged. How can I fix that?
Here is my code:
losd <- ggplot(lo_sd, aes(x = uid, y = bc, color = color)) + geom_point(aes(x = reorder(lo_sd$uid, lo_sd$bc), y = lo_sd$bc), size=2) + geom_errorbar(aes(ymin = lo_sd$lci, ymax = lo_sd$uci), width=0.00, show_guide = F, size = 1) + geom_hline(yintercept = 0, linetype="solid", color = "#6b5e4f", size=1) + scale_y_continuous(limits = c(-0.65, 0.65)) + scale_x_discrete(limits = lo_sd$uid, labels = lo_sd$cname) + scale_color_discrete(name = "Subject tests") + labs(y = "Effect size (sd)", x = "", title = "") + coord_flip()
Thanks you so much!
I would like to use nearPoints on a ggplot map. I was planning on using something like the attached shiny app:
However, it is clear that nearPoints is off. It seems to be more off in the top left than the bottom right.
changing the projection from
coord_map()makes the difference smaller, but it still exists.
Do you have any insights on how to read the appropriate nearPoint?