LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Annotation List Position:X and Y properties do not change anootation position

Solved!
Go to solution
The Annotation List Position:X and Position:Y properties do not seem to change the actual annotation position.  Rather it seems that the Index property must be changed.  If this is correct, is there a use for writing to the Position:X and Position:Y properties ?  See attached example vi
0 Kudos
Message 1 of 7
(5,235 Views)
Solution
Accepted by topic author SteveP

Hey Steve,  there are two modes for positioning the annotation:  "Snap to plot" and "free".  The default is snap to plot, and it points to the sample that matches the "Annotation Index" in the input sample array.  To position it, use the "X or Y Offset" properties just as you been.

 

When in "free" mode (you can switch it by adjusting the "Annotation Mode" property), the annotation postion is given by "Position X" and "Position Y".  Those values are relative to the "Xscale" and "Yscale" properties.  The default for those scale properties are the same as the plot itself, but you can define your own for more precise control. Note that the arrow still points to a point relative to the label vis the "Offset" properties, so those will have to be adjusted as weel to make sure the arrow points where you want it to.

Chris Bakker
SET Americas
CEO

0 Kudos
Message 2 of 7
(5,213 Views)
Thanks.  I will submit feedback for the Annotation List Property Help to clarify that Index is used when the Mode is Snap and the Position X and Position Y are used when the Mode is Free.
0 Kudos
Message 3 of 7
(5,210 Views)
Updated example VI showing dependence on Mode property
0 Kudos
Message 4 of 7
(5,207 Views)

Folks - No matter what I try (whether [index - snap] or [position - free strategy]), I am having some problems with having the annotation move to the cursor X,Y position on the plot as the cursor is moved across the plot.  This is an XY graph with multiple plots.  The zero plot is the waveform and is what the annotation should be following.   Need a second set of eyes to look at this one.

 

ps. this is in LabVIEW 8.5.

 

Thanks,

 

Don

Message Edited by DonRoth on 03-15-2010 10:01 AM
0 Kudos
Message 5 of 7
(4,995 Views)

Hi Don,

 

For what it is worth to you, your code works as-is in LV2009.  Prior to that annotations in XY graphs with scale multipliers was messed up.  All is not lost, I can't test on this machine, but try the following.

 

In your Bundle By Name, in Label.Offset.X wire in X/XScale.Multiplier where X comes from CursLoc.  Similarly for Label.Offset.Y wire in Y/YScale.Multiplier

 

This will (I think) cause the annotation to track the cursor position, you may need to tweak if you want the label on one side or the other.

Message 6 of 7
(4,976 Views)

Hello Darin -

 

I think your strategy works if I remove the PostionX, PositionY, Index inputs that might either conflict or have no impact if I'm not going to show the arrow. What I decided to do was use your suggested strategy for Xposition of the label and then just use the raw data Y max as the constant Y Position.  THANKS!

 

annotation-test.png annotation-test2.png

Message 7 of 7
(4,970 Views)