Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Handling a large number of points in a WaveformGraph

I want to plot a dataset of about 512,000 points. I'm using a WaveformGraph and I can easily plot all the points with no trouble, but my memory usage jumps by about 80 MB per spectrum and everything is obviously slow, even on a fast PC.

Is there a way for the WaveformGraph to only display a reasonable subset of the points? Obviously you can just create your own sub-array and feed that to PlotY() but then you need to handle zooming somehow. I'm hoping there's some way to automatically scale down the points that are displayed without me having to completely redo the zooming behavior.

Thanks!
0 Kudos
Message 1 of 2
(2,993 Views)
Hi Dana,

If you plotting large data sets like 500,000 points, your application will tend to be a little slower. However, you are on the right track. I would advise to create sub array and feed to the plotY function. Regarding the zoom, there is a zoom event for the waveform graphs. The 'zoom in' will retain its original functionality. For the zoom out, we can have it perform a redraw with the next sub array.

There are also several optimization techniques that you can use to make your plotting faster. Please read the help topic "Optimizing Measurement Studio Graph .NET Controls" under Measurement Studio help. I have found in the past that using some of the techniques outlined in this document has indeed made my plots work faster.

I hope this helps

Sijink
National Instruments
0 Kudos
Message 2 of 2
(2,957 Views)