next up previous contents index
Next: Trace Drag and Drop Up: The Plot Panel Previous: Zooming in   Contents   Index


Text String Selection

Text that appears in plots will use a font that can be changed from the font selection panel obtained from the Fonts button in the Tools menu of the Tool Control window. This is the Fixed Pitch Drawing Window Font in the menu. This font can also be changed with the setfont command.

Most of the text strings in plot windows can be edited, and persistent text labels can be added. The possible manipulations are described below.

A string must be selected before it can be edited or otherwise altered. A string can be selected by clicking on it with the left mouse button (button 1). The selection is indicated by the appearance of a thick color1 (default black) bar to the left of the string, and a thin bar to the right of the string. At most one string can be selected at a time.

A string can be deselected by clicking in the plot window away from any string. Clicking on another string will change the current selection to that string.

A drag can be initiated by pressing and holding button 1 over the selected string, and moving the mouse pointer. A ghost outline of the string will be attached to the mouse pointer. When the button is released, the string will be moved to the release location. If the Shift key is pressed while the mouse button is released, the string will be copied to the new location. Strings can be copied to other plot windows using this drag and drop technique, but the Shift key is ignored in this case.

GTK release only
While dragging the string, the left and right arrow keys cycle through left, center, and right justification of the string. The string outline box attached to the mouse pointer will shift to indicate the justification.

Strings have a termination property. When selected, the color of the right side indicator bar will be color1 (default black) if terminated, color2 (default red) if not terminated. When the selected string is not terminated, it can be edited. Pressing the Backspace key (Delete key in Apple) will cause a selected terminated string to become non-terminated. Pressing the Enter key will terminate a selected non-terminated string.

When the selected string is terminated, as indicated by a color1 (default black) vertical bar on the right side:

With the selected string not terminated, an editing mode is active. A vertical line cursor may be visible within the word. This is rendered as color2 (default limegreen). If not visible, it is logically off the right side of the string. Pressing Backspace removes the character to the left of the cursor, and moves the cursor left by one character. With the cursor invisible, Backspace removes the rightmost character in the string. The cursor is moved with the left and right arrow keys. Characters typed on the keyboard are inserted into the string to the right of the cursor, advancing the cursor. The Delete key will delete the character to the right of the cursor. It will have no effect in editing mode if the cursor is not visible.

QT release only
When the cursor is at the beginning or end of the selected string, the left and right arrow keys in the direction of impeded cursor movement will instead cycle the justification used when the string is moved or copied between left, center, and right. This will be seen in the text image used during drag/drop. The present justification is shown by the marks that appear just below the selected text.

If all of the characters are deleted, then the string is deleted. When all characters have been entered, pressing Enter terminates the string and exits the editing mode. Note that presently there is no undo/redo capability.

With no selection, or if the selection is terminated, typing characters into the plot window will start a new string at the mouse cursor location, which becomes the new selection. Terminate the new string by pressing Enter.

The strings, as modified or added, will appear in hard-copies generated from the Print button in the plot window. If a new plot is created by using button 3 to zoom in, the child plot will inherit the text strings of the parent plot. However, if the plot is saved to disk with the Save Plot button, the saved strings will revert to the original strings.


next up previous contents index
Next: Trace Drag and Drop Up: The Plot Panel Previous: Zooming in   Contents   Index
Stephen R. Whiteley 2024-09-29