LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scatter Plot Problem!!

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

 

 

0 Kudos
Message 1 of 4
(3,075 Views)

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.

0 Kudos
Message 2 of 4
(3,046 Views)

@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

 

 

0 Kudos
Message 3 of 4
(3,027 Views)

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.

0 Kudos
Message 4 of 4
(2,981 Views)