EditInteraction - Edit text interaction - MATLAB (original) (raw)
Main Content
Edit text interaction
Since R2021b
Description
An edit interaction allows you to select text within a figure and edit that text. To enable editing, set the Interactions
property of the text to aeditInteraction
object. This interaction is on by default for title, subtitle, xlabel, ylabel, andzlabel text objects for axes, geoaxes, polaraxes.
Creation
Syntax
Description
`e` = editInteraction
creates an edit interaction object which enables you to edit text by clicking or tapping a text object. To enable interactive editing, set the Interactions
property of the text to the object returned by this function.
Examples
Create a surface plot. Add text to the plot and assign the text object to t
. Add edit interactions to the Interactions
property of t
. Click the text to edit.
surf(peaks) t = text(0,55,5,"My Plot"); t.Interactions = editInteraction;
Version History
Introduced in R2021b