wolfram mathematica - Speed up ListLinePlot -


i trying use mathematica analyse raw data. i'd able dynamically display range of data i'm interested in using manipulate , listlineplot, plot rendering extremely slow. how can speed up?

here additional details. external text file stores raw data: first column timestamp, second, third , fourth columns data readings, example:

1309555993069, -2.369941, 6.129157, 6.823794 1309555993122, -2.260978, 6.170018, 7.014479 1309555993183, -2.070293, 6.129157, 6.823794 1309555993242, -1.988571, 6.238119, 7.123442 

a single data file contains 2·106 lines. display, example, second column, use:

x = import["path/to/datafile"]; listlineplot[x[[all, {1, 2}]]] 

the execution time of operation unbearably long. display variable range of data tried use manipulate:

manipulate[listlineplot[take[x, numrows][[all, {1, 2}]]], {numrows, 1, length[x]}] 

this instruction works, crawls when try display more few thousand lines. how can speed up?

some additional details:

  • matlab displays same amount of data on same computer instantaneously, raw data size shouldn't issue.
  • i tried turn off graphics antialiasing, didn't impact rendering speed @ all.
  • using datarange avoid take doesn't help.
  • using maxplotpoints distorts plot useful.
  • not using take in manipulate doesn't help.
  • the rendering seems take huge amount of time. running timing[listlineplot[take[x,100000][[all, {1, 2}]]]] returns 0.33: means evaluation of take instantaneous, plot rendering slows down.
  • i running mathematica on ubuntu linux 11.10 using fglrx drivers. forcing mathematica use mesa drivers didn't help.

any hint?

i haven't tested extensively on machine (i have mac, can't rule out linux-specific issues). couple of points occur me. following pretty quick me, slower if data set smaller. plotting hundreds of thousands of data points.

data = accumulate@randomvariate[normaldistribution[], 200000]; manipulate[listlineplot[take[data, n]], {n, 1, length[data]}] 
  1. in manipulate, allowing amount of data shown take vary arbitrarily. try incrementing numrows every 100 or points, there less render.
  2. try using continuousaction->false option (see documentation) (i see @szabolcs had same idea typing.
  3. i suggest maxplotpoints, instead try performancegoal ->"speed" option. (see documentation)

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -