MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 315

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 314
Add Code for Components in C allbacks
Note For information about properties that you can set to control many
aspects of axes behavior and appearance, see “Axes Objects Defining
Coordinate Systems for Graphs”.
If your GUI contains axes, you should make sure that the Command-line
accessibility option in the GUI Options dialog box is set to Callback (the
default). From the Layout Editor select Tools > GUI Options > Command
Line Accessibility: Callback. See “C om mand-Line Accessibility” on pa ge
5-11 for more information about how this option works.
Creating Subplots
Use the subplot function to create axes in a tiled pattern. If your
GUIDE-generated GUI contains components other than the subplots, the
subplots must be contained in a panel.
As an example, the following code uses the
subplot function to create an
axes w ith two subplots in the panel with
Tag property uipanel1.Thiscode
is part of the Plot push button
Callback callback. Each tim e you press the
Plot button, the code draws a line in each subplot.
a1 and a2 are the handles
of the subplots.
a1=subplot(2,1,1,'Parent',handles.uipan el1);
plot(a1,rand(1,10),'r');
a2=subplot(2,1,2,'Parent',handles.u ipanel1);
plot(a2,rand(1,10),'b');
8-47
Vue de la page 314
1 2 ... 310 311 312 313 314 315 316 317 318 319 320 ... 758 759

Commentaires sur ces manuels

Pas de commentaire