Graphics Programs Reference
In-Depth Information
set(h,'xdata',t,'ydata',sin(370*t))
drawnow
end
The example should update the data without flicker. If you then set the
doublebuffer
property to
off
, you should see the window flicker as the
new data updates the plot.
34.8 Guide
When writing code to generate GUIs you can very quickly get bogged
down in messy coding. For example, it is tedious to calculate the “posi-
tion” properties of the various elements so that they line up nicely. The
task of generating GUIs is made much easier with the matlab tool
guide
. The name
guide
is short for Graphical User Interface Devel-
opment Environment.
Guide
is a GUIfor drawing GUs. With it you
select uicontrols, position them with the mouse, align them with the
alignment tool, and set the properties with a graphical property editor.
Iused
guide
to produce most of the GUIexamples so far. When you
type
guide
at the matlab prompt, the current figure shows a grid in
the background, showing that it is now a
guide
-controlled figure, and
the
guide
control panel appears. Try typing
guide
now and you should
see the following control panel on your screen:
The four big buttons at the top of the control panel bring up four other
control panels. The listbox in the middle displays which figures are being