简体   繁体   English

从r中的plot.ly或ggvis中的鼠标事件获取数据(不发光)

[英]Get data from mouse events in plot.ly or ggvis within r (not shiny)

我想在R中使用交互式绘图,以便能够选择绘图中的x间隔,我已经尝试了plot.ly和ggvis,看来鼠标单击绘图后再进行水平拖动,这正是我想要的,但是必须禁用缩放功能,并且必须将[x start,x end]值返回给R。如果可以的话,有什么想法?

I tried to make tooltip function available with static_output (without shiny). 我试图通过static_output使工具提示功能可用(无光泽)。 You can check my fork ( https://github.com/lujiacn/ggvis ), enable the tooltip by default, in Rstudio and output html widget. 您可以检查我的fork( https://github.com/lujiacn/ggvis ),默认情况下在Rstudio中启用工具提示,并输出html小部件。

The way is put tooltip content in one variable called "tooltip". 将工具提示内容放在一个称为“工具提示”的变量中的方法。 If no "tooltip" variable, wills show the all values linked to the data. 如果没有“ tooltip”变量,wills将显示链接到数据的所有值。

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

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