setdrawenv and textbox

My wish would be to combine the advantages of the commands setdrawenv and textbox

I want to add text to a graph. So far I am using textbox for that.
The disadvantage is, that the textbox is anchored to the relative coordinates of the plot area.
Modifying the axes ranges thus does does not move the textboxes but then they
are in the wrong possition relative to the wave symbols.

I have tried using setdrawenv and drawtext in order to have my text
fixed to the waves that I am plotting, so that it stays in the same position
relativ to the wavesymbols when I am changing the axis range.

The disadvantage here is that I don't have the opaque background of a textbox
(i could certainly put a filled square behind using drawbox but that seems a little cumbersome).
the second more relevant disadvantage that I can't finetune the position by dragging the text with the mouse.

Is there a possibility to define the position of a textbox relative to the axis
(analogous to what's done with setdrawenv ycoord=left, xcoord=bottom)?


You might try using a tag rather than a textbox. A tag is the same as a textbox except that it attached to a particular point of a particular wave.

You can change a textbox into a tag using the Modify Annotation dialog (double-click the textbox) and choosing Tag from the Annotation popup menu in the top/left corner of the dialog.

To change the point to which the tag is attached, in the graph, press Option (Macintosh) or Alt (Windows) and drag the tag body to the point to which you want it attached.

Is there a bug with the tag dragging? When I press Option (Macintosh) and drag the tag body to the desired position, the tag usually doesn't move, but sometimes it can jump a little or a lot, but it never moves to the desired position. However, once it's moved, it can be dragged to the desired position without pressing Option, and the tag can successfully stay around the same axis coordinate after the axis range is changed. But the first/initiating dragging action is quite difficult... (My IgorPro version is 6.22A on Mac.)
Option-drag changes the data point the tag is attached to. The X and Y offset between the tag and the data point is not changed.

Simple drag changes the X and Y offset between the tag and its attachment point on the trace. The data point to which it is attached is not changed.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
A tag's attachment point is some point on a trace. Option-dragging the attachment point to somewhere that isn't a trace won't work; you need to release the mouse when it is over the trace.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.