From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to link a variable to a graph cursor or vice versa? I want to be able to change the graph cursors and have their values be used in another calculation.


WyndyPickle wrote:

Nevermind.. I found the Cursor List attribute.


What is the cursor list attribute?

 

Arrow is right. Only one cursor can be the active cursor at any given time and if your property nodes does not specify which one, you get a possibly unpredictable result that e.g. depends which cursor you touched last.

 

Property nodes execute top to bottom, so here would be a direct way to get both cursor positions with one single property node.

 

 

 

(You also need to be careful to only make cursors active that actually exists.)

0 Kudos
Message 11 of 16
(396 Views)

@altenbach wrote:

WyndyPickle wrote:

Nevermind.. I found the Cursor List attribute.


What is the cursor list attribute?

 


 

Before LV6 (I think) Property Nodes were called Attribute Nodes. I still slip up now and then myself.
0 Kudos
Message 12 of 16
(385 Views)

A related question, and maybe this should be its own thread.

 

So I have successfuly used these cursors to specify and area of a graph, for which I calculate the full width half max of. Now I want to make it look a little nicer and put in a line, on the existing graph, from one side of the measured peak, to the other, at the level of the FWHM. I know how to make multiarray plots.. which will let me build the two datasets I need to do this, but what I don't know is how to make elements of the array null.

 

I.e., I have a peak, and I want to draw a line at the FWHM level inside the peak .. to illustrate where the FWHM level is. If I build an array .. it seems as if the values outside the peak will be zero.. and my 'line inside the graph' will become a line inside the graph, and then a big line down to a constant zero level.

 

I've attached a .. well pretty bad paint example of what I want to do.. but I hope this gets the point across.

 

 

0 Kudos
Message 13 of 16
(376 Views)

Use the plot images property. It allows you to draw anything on your graph using picture functions.

 

See this example. (your case is simpler because you already know the positions)

 

(If you simply want to blank some points of a plot, replace them with NaN)

0 Kudos
Message 14 of 16
(370 Views)

I don't want to manually draw the line I want the program to do it for me based on the value of the full width half max. But, I think the NaN thing will work.

0 Kudos
Message 15 of 16
(367 Views)

@WyndyPickle wrote:

I don't want to manually draw the line I want the program to do it for me based on the value of the full width half max.


That's why I said your problem is simpler, because you already know the positions! 😉

 

In your case you would also need to map values to pixels. Have a look at the example "Graph Plot Area Images.vi" in the example finder to see how to do that.

 

Yes, using NaN is probably simpler.... 😉

0 Kudos
Message 16 of 16
(365 Views)