PP Icon

Plot Annotation

You can annotate a plot with labels, arrows, and other shapes.

TextEdit Icon

Labels

To add a text label to a plot:

  1. Choose the Add Text menu command or click the text icon in the tool bar.
  2. To change label text, double click the label, type new text, followed by return, tab, or enter (or click outside the label field).
  3. You can also select a label and then and edit it in the Plot Inspector (which can be opened by menu command, tool bar icon, or by double clicking the label). The editing options will appear in the Object tab in the inspector. Enter new text or click the font or color icons to change the label font or color.
  4. You can select a label and use the Edit menu commands to cut, copy, paste, or clear. Copied labels can be pasted into other PublishPlot documents or pasted as plain text into other applications.
  5. You can drag a label to any location in the plot, drag it to another plot (which copies it to that plot), or drag to another application. To duplicate the label in the same plot, hold the option key down while dragging.
  6. While dragging within the plot, the left and bottom coordinates of the label (in pixels) will be displayed in a small field in the lower-right corner of the window.
  7. You can use arrow keys to reposition a selected label one pixel at time.

Note: Labels can have subscripts and superscripts. Any character following an underscore will be subscripted. For example "x_1" will produce "x1". Any character following a caret will be superscripted. For example "x^2" will produce "x2". To subscript or superscript multiple characters, enclose them in curly brackets after the underscore or caret. For example "M_{avg}" will produce "Mavg" (but you cannot have subscripts or superscripts within the brackets). To use an underscore or caret in the label, enter two characters such as "__" or "^^".

Note: You can set color of a text label by dragging a color from any color well on top the that text.

Note: You can drag (or copy and paste) a single line of text from another application on top of a PublishPlot document and it will become a label in the plot. If you drop text on an existing label, that label will change to the dropped text.

TextEdit Icon

Shapes

To add an arrow, a double arrow (arrow head on both ends), a rectangle, an oval, or a line to a plot:

  1. Choose any shape command in the Shapes submenu. Alternatively, you can click the shapes icon in the tool bar. If you click quickly, an arrow wil be added; if you click and hold, you can pick any shape type from a pop-up menu.
  2. Click and drag either end or corner of the shape to reorient it. For arrows and lines, hold down the shift key will dragging to orient the arrow or line to be a horizontal, vertical, or diagonal line that is closest to current drag position.
  3. Click and drag in the contents of the shape to drag the entire shape to a new location. To duplicate the shape, hold the option key down while dragging.If you drag to to another plot window, the shape will be copied to that plot.
  4. While dragging the entire shape within the plot, the left and bottom coordinates of the shape (in pixels) will be displayed in a small field in the lower-right corner of the window.
  5. To change shape appearance, double click on the shape to open it in the inspector, or single click if the inspector is already open. The options will appear in the Object tab in the inspector. Use the "Shape Line" section to customize shape lines; use the "Shape Settings" section to customize the arrowhead or rectangle and oval settings. The methods are explained in Customizing Plotted Data.
  6. You can select any shape and use the Edit menu commands to cut, copy, paste, or clear. Copied shapes can be pasted into other PublishPlot documents.
  7. You can use arrow keys to move a selected shape one pixel at time.
TextEdit Icon

Plot Key

A plot key will list all plotted data sets within a rectangular shape with their names (set in the inspector) on the right and their line types and symbols on the left. Note that names can have subscripts and superscripts as explained above and can control which data sets appear in the key. To omit a data set from the key, use an empty name or start the name with a back slash ('\'). If you need a name in the key to start in a back slash, start the name in two back slashes (only the first will be in the key).

To add a plot key to a plot and adjust its properties:

  1. Choose the "Plot Key" command in the Shapes submenu. Alternatively, you can click and hold on the shapes icon in the tool bar. When the pop-up menu appears, choose "Add Plot Key" from that menu. Each plot can have only one "Plot Key" and trying to add a second will cause an error.
  2. Click and drag either corner of the plot key's rectangle to change its size. The text automatically adjusts to fit the space available. Change size of the rectangle to get desired text size and/or change the length of data set names.
  3. Click and drag in the contents of the plot key to drag it to a new location. While dragging within the plot, the left and bottom coordinates of the key (in pixels) will be displayed in a small field in the lower-right corner of the window.
  4. To change plot key appearance, double click on it's rectangle to open it in the inspector, or single click if the inspector is already open. The options will appear in the Object tab in the inspector. Use the "Shape Settings" section to customize the text, text color, the border color, and the fill color. The methods are explained here.
  5. You can select the plot key shape and use the Edit menu commands to cut, copy, paste, or clear. Copied plot keys can be pasted into any PublishPlot document that does not already have a key.
  6. You can use arrow keys to move a plot key one pixel at time.

PublishPlot did not have a plot key option until version 3.1. The reason is that plot keys are a poor choice for presenting or publishing plots. When giving a presentation, your audience will hate needing to connect plot keys to plotted data to follow your talk. A much better practice is to annotate plots for presentation slides with labels and arrows pointing directly to data sets (labels and arrows have always been available in PublishPlot). Plot keys are sometimes acceptable in published papers, but even that use should be discouraged because line types and colors may be hard to distinguish in the final published version. A plot key, however, can be a useful and quick way to label plots for personal use only. They are now included in PublishPlot for this use and because it was a commonly requested feature. The recommendation remains that plot keys should be limited to non-published plots.