Main Content

plotedit

Interactively edit and annotate plots

    Description

    plotedit toggles the state of plot edit mode for the current figure. If no current figure exists, plotedit creates one. Alternatively, you can click Select & Plot Edit on the Format tab of a figure window.

    Plot edit mode allows you to use a graphical interface to edit and annotate plots easily. In plot edit mode, you can modify properties of graphics objects.

    example

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

    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 previous syntaxes.

    Examples

    collapse all

    Create a line plot and toggle the state of plot edit mode for the figure by calling the plotedit function.

    plot(magic(5))
    plotedit

    Line plot with the axes selected. On the Format tab of the figure, the Select & Plot Edit button is pressed.

    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.

    Limitations

    • Plot edit mode does not support selecting UI panels and components, such as uipanel or uitable. To create figure-based apps, use App Designer.

    Alternatives

    Start or end plot edit mode by clicking the Select & Plot Edit button on the Format tab of the figure window.

    Version History

    Introduced before R2006a

    collapse all