User`s guide

15 Examples of GUIs Created Programmatically
end
end
Subfunction Summary for tableplot
The tableplot ex ample conta in s the callbacks l isted in th e following table,
which are discussed in the previous section. Click a function’s name to open it
in the Editor window.
Function Description
plot_callback
Called by the Plot check boxes to extract data from the
uitable and plot it, and to delete lines from the plot when
toggled
select_callback
Erases and then replots markers, showing only those that
correspond to user-selected cells in the uitable, if any.
The select_callback uses eventdata (cell selection indices); the other
callback has no event data.
Further Explorations with tableplot
You can generalize the tableplot GUI in several ways to enhance its utility:
Allow the user to edit table values.
Enabling editing by the user involves setting the uitable
ColumnEditable
property to true and, if necessary, coding its Cell EditCallback.Editing
data cells might require updating the line plot and cell selection m arkers
if they are visible; to make this happen, however, you must provide code
to replot graphics similar to the code in the existing
plot_callback and
select_callback.
Note The refres hdata function updates graphs w hen workspace
variables that they display change. However, as the tableplot GUI contains
its own data sources, you cannot use
refreshdata within it for this purpose.
15-30