powered by
hexDat
data(hexDat) library(plotly) p <- ggplot(hexDat, aes(xcent, ycent, text = Electorate)) + geom_hex(stat = "identity") + lims(x=c(-80, 8), y=c(-40, 50)) ggplotly(p, tooltip = "text")
Run the code above in your browser using DataLab