R bokeh hexbin colorlegend?

时间:2017-09-25 13:43:53

标签: r rbokeh

我一直用rbokeh创建一个六边形分箱图,效果非常好。但是,我真的想在我的情节中加入一个彩色图例,这似乎不起作用。

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

Rbokeh plot

通过geom_hex()命令阐明我希望通过ggplot2获得类似的图例

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

Same plot but with ggplot2 with legend

1 个答案:

答案 0 :(得分:1)

目前rbokeh无法实现这一目标,但很快将会在未来的版本中发布。我建议在github上打开一个问题,以便进一步跟踪此问题。