LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

inserting point onto graph

From the existing, unfinished code fragments, I am guessing cig wants to label all peaks in green and all valleys in a different colors. You would just repeat the same code for the valleys using a different color, then concatenate the two cursor arrays before writing to the cursor list property.
 
0 Kudos
Message 11 of 14
(827 Views)
That's it exactly - I need to highlight the peaks & valleys in any one color.

Thanks for the help -  I need to clarify all this in my mind. One more question : I currently have a while loop setup where I vary some control parameters & observe the resulting peak points found.
I need for the cursor points to refresh at each loop iteration. Right now the cursors just accumulate. How can I reset the CursorList to an empty array of clusters ? It looks like this should be done inside the loop.

ak

Message 12 of 14
(822 Views)


@cig438 wrote:
I need for the cursor points to refresh at each loop iteration. Right now the cursors just accumulate. How can I reset the CursorList to an empty array of clusters ? It looks like this should be done inside the loop.

Simply use my method as in the second picture. This generates the cursor list from scratch instead of re-using any existing cursors.

(I still think you should use a second and third plot instead of cursors, though. ;:)

Message 13 of 14
(818 Views)

I'm still using 7.1 so I can't see your code but since you wrote:

"That's it exactly - I need to highlight the peaks & valleys in any one color."

Have you looked at the example called 'Peak Detection and Display.vi'???  It uses the method Altenbach recommends (i.e. plot points), is interactive, and is quite a bit simpler to implement than the path you're taking.  If you've already gone down this route then...  Never mind.Smiley Indifferent  

 (I never thought I would have a use for the "smileyindifferent" emoticon) Smiley Happy

 
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 14 of 14
(808 Views)