05-14-2014 06:39 AM
Hello everyone,
I am quite new at Labview and I have a question regarding plotting 2d-array in a scatter plot.
I would like to plot my data as a scatter plot, which I have done with the Waveform graph, and now I would like to find out the area with the highest density in the scatter plot
and mark the area with a circle...is it possible in Labview to realize this?? I would be very thankful for every tips!
Thank You
Best Regards
Yun
05-14-2014 12:52 PM
Yes it is possible. You said you are using a waveform graph, wouldn't an XY graph be a better choice? I don't know the data you are getting so a waveform graph might be the right tool here.
In either case you'll need to define a length of X that you want to find the denses amount of points. So say X=1 so then you will find all the points between 0 and 1 and count them, then 0.1 to 1.1 and count them, then 0.2 to 1.2 for the length of X on your graph. Doing this in a For loop will make it easy, and then your output will be an array of counts for each section. Find the maximum using the Array Max & Min function.
Then you can highlight the graph using property nodes. You can use a cursor, or annotation, or a custom picture. The easiest would probably be an Annotation and in the Example finder there is one called "Graph Annotations" that find the minimum, maximum, and average values for a graph and put an overlay on the graph.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-14-2014 06:36 PM
@Hoovaah
First of all thank you for your tip! but could you please explain me a little bit more explicit how I can count the amount of dense in a For Loop?? Do you have any example so I can get some idea? It would be very helpful!
Thank you
Best Regards
Yun
05-15-2014 08:41 AM
Here's a quick exqample saved in 2011 that I think shows the basics. It has several bugs you will need to figure out. Like right now this only works if the graph is in the upper left hand corner, I couldn't figure out how to find the offset needed based on the graph position.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord