Documentation Center

  • Trial Software
  • Product Updates

Adding Arrows and Lines to Graphs

Creating Arrows and Lines in Plot Editing Mode

With plot editing mode enabled, you can add arrows and lines anywhere in a figure window.

You can also use arrow characters (TeX characters) to create arrows using the text function. However, arrows created this way can only point to the left or right, horizontally. See Calculating the Positions of Text Annotations for an example.

To add an arrow or line annotation to a graph,

  1. Click the Insert menu and choose the Arrow or Line option, or click the Arrow or Line button in the Plot Edit toolbar.

    The cursor changes to a cross-hair.

  2. Position the cursor in the figure where you want to start the line or arrow and press either mouse button. Hold the button down and move the mouse to define the length and direction of the line or arrow.

  3. Release the mouse button.

    Note   After you add an arrow or line, plot edit mode is enabled in the figure, if it was not already enabled.

Editing Arrows and Line Annotations

You can edit the appearance of arrow and line annotations using the context menu.

With plot editing mode enabled, right-click the arrow or line annotation to display its context menu.

You can select an annotation and then choose Show M-code to obtain a code snippet that you can insert in a function or script to reproduce the annotation.

For more options, select Properties to display the Property Editor.

Was this topic helpful?