LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot whole history data on a XY-graph if the data size is too big.

    Hello,
     
      I try to create time vs. Vrms on a XY-graph for last 1 year. Here is the plot:

  

 The x-value is timestamp and the y-value is Vrms. The data are read from a file. The interval between each timestamp is different so that I choose the XY-graph.
However, it seems that if the data size is too big ( one sample each min for 6 months). I can't get the plot correctly. I read some articles that try to divide the data into several small arrays and plot these arrays as the way we generate a multi xy-graph. But I tried this and it still doesn't work for me.
 Is there any way to generate a XY-graph if the data size is too big? Thank you very much.

Benjamin Chu
0 Kudos
Message 1 of 13
(4,695 Views)
500k point XY is not too large to plot.  See example.  Exactly what issues are you seeing.  Remembe that an Multi XY plot is an array of clusters which are inthemselves and array of xy clusters.  Sorry for the slopy coding I put this together in about 1 min.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 13
(4,690 Views)
Benjamin,

Any display (of a line plot) can only show a number of points equal to the width of the plot in pixels. If you feed more data than that to the plot, it will reduce the data in some way to fit. For six months of one sample per minute you will have over 250000 data points and about 750 pixels. Each pixel somehow represents over 300 data points.

I have not tried to plot that many point on an XY graph so I do not know how LV handles the data reduction. You could program you own and control how the data is processed and how many points you feed to the graph. You could average groups of 300+ points and plot the result or decimate or use the maximum in each interval or whatever creates the most useful display for the application.

Lynn
Message 3 of 13
(4,688 Views)
It is often quite a bit cleaner to simply use complex numbers. Here's how falkl's example would look like.
 
 
Of course it does not make sense to show 50000 point in <1000 pixels, but of you would enable the x-scollbar you could pan through your data more easily (see picture). Once things get too sluggish, you need to apply some of the techniques discussed in the following tutorial:
 
 
 


Message Edited by altenbach on 04-29-2008 01:29 PM
Message 4 of 13
(4,683 Views)
Hello,
 I follolwed this code and it works well for me. Thanks for the help.


Benjamin
0 Kudos
Message 5 of 13
(4,660 Views)
Hello,
 I found I have another problem. While VI reads data from a file, it takes long time to plot the whole history. Is that possible to read a chunk of data from a file and plot these data first and read another chunk of data, plot these data and still hold the previous data on the plot? It seems that the multi-XY graph doesn't work for me because it generate all the plots at the same time. Thank you very much.

    Best Regards,

Benjamin Chu
0 Kudos
Message 6 of 13
(4,619 Views)

It sounds like the problem resides in the architecture...   It should be relatively quick.  I would not do it in chunks.

Can you post your code?

0 Kudos
Message 7 of 13
(4,616 Views)
Hello,
 Here is the VI.

 Plots VI

 Is there any way to get a chunk of data and plot these data first and then get another chunk of data, plot the data, and still hold the previous data on the plot? Thanks for the help.
0 Kudos
Message 8 of 13
(4,590 Views)
Please post your txt file also.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 9 of 13
(4,582 Views)
Here is the text file:

Text File

Thanks
0 Kudos
Message 10 of 13
(4,574 Views)