简体   繁体   English

R bokeh hexbin colorlegend?

[英]R bokeh hexbin colorlegend?

I have been creating a hexagonal binning plot with rbokeh, which worked wonderfully. 我一直在用rbokeh创建一个六角形的装箱图,效果很好。 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图

To clarify what I would like to achieve to have a similar legend as in ggplot2 with the geom_hex() command 为了澄清我希望通过使用geom_hex()命令获得与ggplot2类似的图例

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

相同的情节,但带有图例的ggplot2

This is currently not possible with rbokeh but will be soon in a future release that is underway. rbokeh目前无法做到这一点,但将在即将发布的将来版本中很快实现。 I would recommend opening an issue on github to track this further. 我建议在github上发布一个问题以进一步跟踪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM