I'm trying to add a tag to my graph as part of a script, however every time it runs instead of adding a tag it adds a textbox. I assume this is an easy fix, however whenever I scour the internet I can't find anything to help, so any help here is appreacited!
Thanks for your quick response Andy! I understand what you mean and I fixed it, however now I get the error "While executing Tag, the following error occurred: trace is not on graph". Does this mean the point I selected doesn't actually exist on my graph? If it helps at all, I selected point 50000 because that corresponds to about the 163 mark on my x-axis which is the point I'm trying to label. Sorry for the dumb questions!
It would be helpful if you posted the command you're trying to use. But I'll take a guess-
Tag/C/N=text0/F=1$NameOfWave(wave1),50000,"This is my tag"
A frequent point of confusion- a trace is not a wave, so you can't simply use "wave1" since that is a wave reference variable pointing to a wave. This command makes the assumption that there is no reason for the trace to be "wave1#1" or something like that. The code you posted has just the one trace, so this should be safe.
Hi,
At first glance it does not appear that you are giving a wave name and point for the attachment in the tag command.
// Tag command with all optional parameters included
Tag/N=tag0 wave0, 0, "Point 0 on wave0" // Add a tag to a trace
Andy
March 4, 2022 at 08:51 am - Permalink
Thanks for your quick response Andy! I understand what you mean and I fixed it, however now I get the error "While executing Tag, the following error occurred: trace is not on graph". Does this mean the point I selected doesn't actually exist on my graph? If it helps at all, I selected point 50000 because that corresponds to about the 163 mark on my x-axis which is the point I'm trying to label. Sorry for the dumb questions!
March 4, 2022 at 09:15 am - Permalink
It would be helpful if you posted the command you're trying to use. But I'll take a guess-
Tag/C/N=text0/F=1 $NameOfWave(wave1),50000,"This is my tag"
A frequent point of confusion- a trace is not a wave, so you can't simply use "wave1" since that is a wave reference variable pointing to a wave. This command makes the assumption that there is no reason for the trace to be "wave1#1" or something like that. The code you posted has just the one trace, so this should be safe.
March 4, 2022 at 09:20 am - Permalink
In reply to It would be helpful if you… by johnweeks
Ok that makes sense, and now it works! If I ever meet you in real life John I owe you a beer!
March 4, 2022 at 09:25 am - Permalink
Portland, OR! :)
March 4, 2022 at 05:01 pm - Permalink