Graphics    

Example - Aligning Text

Suppose you want to label the minimum and maximum values in a plot with text that is anchored to these points and that displays the actual values. This example uses the plotted data to determine the location of the text and the values to display on the graph. One column from the peaks matrix generates the data to plot.

The first step is to find the indices of the minimum and maximum values to determine the coordinates needed to position the text at these points (get, find). Then create the string by concatenating the values with a description of what the values are.

The text function positions the string relative to the point specified by the coordinates, in accordance with the settings of the alignment properties. For the minimum value, the string appears to the right of the text position point; for the maximum value the string appears above and to the left of the text position point. The text always remains in the plane of the computer screen, regardless of the view.

Editing Text Annotations

You can edit any of the text labels or annotations in a graph:

  1. Start plot edit mode.
  2. Double-click on the string. Or right-click on the string and select String from the context-sensitive pop-up menu.

    An editing box appears around the text.

  1. Make any changes to the text.
  2. Click anywhere outside of the text edit box to end text editing.


 Adding Text Annotations to a Graph Including Symbols and Greek Letters in Text Strings