| switch get(hObject,'Tag') % Get Tag of selected object case 'radiobutton1' % Code for when radiobutton1 is selected, case 'radiobutton2' % Code for when radiobutton2 is selected. case 'togglebutton1' % Code for when togglebutton1 is selected. case 'togglebutton2' % Code for when togglebutton2 is selected. % Continue with more cases as necessary. otherwise % Code for when there is no match. end See the uibuttongroup reference page for another example. Axes Axes components enable your GUI to display graphics, such as graphs and images. This topic briefly tells you how to plot to axes components in your GUI. • "Plotting to an Axes" on page 8-31 • "Creating Subplots" on page 8-34 Plotting to an Axes In most cases, you create a plot in an axes from a callback that belongs to some other component in the GUI. For example, pressing a button might trigger the plotting of a graph to an axes. In this case, the button's Callback callback contains the code that generates the plot. |