Main Content

plotedit

Interactively edit and annotate plots

    Description

    plotedit toggles the state of plot edit mode for the current figure. Plot edit mode allows you to use a graphical interface to edit and annotate plots easily. In plot edit mode, you can label axes, change line styles, and add text, line, and arrow annotations. If no current figure exists, plotedit will create one.

    plotedit(state) changes the state of plot edit mode on the figure. For example, plotedit("on") starts plot edit mode for the current figure.

    example

    plotedit(fig,___) operates on the specified figure instead of the current figure. The input fig can precede any of the input argument combinations in the other syntaxes.

    Examples

    collapse all

    Start plot edit mode on a figure by calling the plotedit function.

    f = figure;
    plotedit(f)

    Input Arguments

    collapse all

    Plot edit mode state, specified as one of these values:

    • "on" — Start plot edit mode.

    • "off" — End plot edit mode.

    • "toggle" — Switch plot edit mode between the "on" and "off" states.

    Example: plotedit("on") starts plot edit mode for the current figure.

    Target figure, specified as a Figure object. Use fig to enable or disable plot edit mode on a specific figure instead of the current figure.

    Example: plotedit(f) toggles plot edit mode on the figure f.

    Alternatives

    Start or end plot edit mode by clicking on the Edit Plot button in the figure toolbar.

    Version History

    Introduced before R2006a

    expand all