I am hoping to plot a picture behind a bar chart. I have been following this question (Plot data over background image with ggplot) to some success (troubling doing with a bar chart).
But I have been trying to plot my ggplot
in plotly
but get the error code:
Warning message: In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) : geom_GeomCustomAnn() has yet to be implemented in plotly.
It seems as if you cannot use this logic within plotly. Is there any way around this? Examples are appreciated.
Example of my problem:
img <- readJPEG("~/Documents/DWat.jpeg")
dw <- ggplot(ThirdDown, aes(Receiver, Targets)) + geom_bar(aes(text=Rec), stat="identity", fill="orange") +
annotation_custom(rasterGrob(img, width=unit(1,"npc"), height=unit(1,"npc")),
-Inf, Inf, -Inf, Inf) + stat_bin2d() +
scale_y_continuous(expand=c(0,0))
dw
ggplotly(dw, hoverinfo="text+x+y")