R bokeh hexbin colorlegend?

125 views Asked by At

I have been creating a hexagonal binning plot with rbokeh, which worked wonderfully. However, I would really like to a color legend into my plot, which does not seem to work.

library(rbokeh)
figure(legend_location = "top_right") %>%   ly_hexbin(x=hp,y=mpg,data=mtcars) 

Rbokeh plot

To clarify what I would like to achieve to have a similar legend as in ggplot2 with the geom_hex() command

library(ggplot2)
ggplot(data=mtcars, aes(x=hp,y=mpg)) + geom_hex()+theme_minimal()

Same plot but with ggplot2 with legend

1

There are 1 answers

0
Ryan On

This is currently not possible with rbokeh but will be soon in a future release that is underway. I would recommend opening an issue on github to track this further.