简体   繁体   English

使用R交互式绘制大数据(几百万)

[英]Interactive plotting of large data (few millions) with R

I am trying to visualize several hours of neuronal recordings sampled at 500Hz using R in Ubuntu 16.04. 我正在尝试在Ubuntu 16.04中使用R可视化几个小时以500Hz采样的神经元录音。 Simply I want to have a 2D plot that shows a value (voltage) over time. 我只是想拥有一个2D图,显示随时间变化的值(电压)。 Its important for to have the plot in an interactive way. 对于以交互方式进行绘图很重要。 I need to have an overall look, compare different times and zoom in and out, therefor I don't want to split my data into different parts and visualize them separately.(Also I can not use the normal R plot since zooming there is a pain and sometimes impossible) What I came up with so far is to use "plot_ly" with scatterrgl type to get started and I could successfully plot 300'000 data points. 我需要有一个整体外观,比较不同的时间并放大和缩小,因此我不想将我的数据分为不同的部分并分别可视化。(而且我不能使用普通的R图,因为缩放有一个痛苦,有时甚至是不可能的。)到目前为止,我想出的是使用带有scatterrgl类型的“ plot_ly”开始学习,我可以成功绘制30万个数据点。 But that is the limit I can get so far. 但这是到目前为止我可以达到的极限。 Above this amount of data the whole R software freezes and exits. 超过此数据量,整个R软件将冻结并退出。 The frustrating part is that this can be done easily in MATLAB and with R it seems impossible. 令人沮丧的是,这可以在MATLAB中轻松完成,而使用R似乎是不可能的。 Is there any alternative to plot_ly for plotting large data in R? 除了在R中绘制大数据外,plot_ly是否有其他选择?

You might try the dygraph package, working fine here with 500k points: 您可以尝试dygraph程序包,在这里可以用500k点正常工作:

library(dygraphs)
my_data = data.frame(x = 1:500000, y = rnorm(500000))
dygraph(my_data) %>% dyRangeSelector()

在此处输入图片说明

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

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