User`s guide
11 Lay Out a Programmatic GUI
'Position',[.1 .6 .3 .2]);
rbh2 = uicontrol(bgh,'Style','r adiobutton','String','B lue',...
'Units','normalized',...
'Position',[.1 .2 .3 .2]);
By default, the software automatically selects the first radio button added to
a button group. You can use the radio button
Value property to explicitly
specify th e initial selection. See “Rad io Button” on page 11-27 for information.
Add Axes
Axes enable your GUI to display graphics such as graphs and images using
commands such as:
plot, su rf, line, bar, polar, pie, contour,andmesh.
Note See “Types of GUI Components” on page 11-9 for a des cription of this
component.
Use the axes function to create an axes. A syntax f or this function is
ah = axes('PropertyName',PropertyV alue,...)
where ah is the handle of the resulting axes. You must use the Parent
property to specify the axes parent. If y ou do not specify Parent, the parent
is the current figure as specified by the root
CurrentFigure property. See
the
axes reference page for other valid syntaxes.
Subsequent topics describe commonly used properties of axes and offer a
simple example.
• “Commonly U sed Properties” on page 11-39
11-38