06-18-2009 08:43 AM
Solved! Go to Solution.
06-19-2009 03:08 PM
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.
06-19-2009 03:15 PM
06-19-2009 03:27 PM
03-15-2010 10:00 AM - edited 03-15-2010 10:01 AM
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
03-15-2010 12:32 PM
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.
03-15-2010 02:14 PM
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!