1

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")
Community
  • 1
  • 1
a.powell
  • 1,572
  • 4
  • 28
  • 39
  • 1
    Could you give a reproducible example? http://stackoverflow.com/help/mcve – Hack-R Aug 16 '16 at 03:47
  • @Hack-R check out the example above. Sorry its not the most reproducible but hopefully it will show what I'm trying to do – a.powell Aug 16 '16 at 12:41

0 Answers0