grid = Simulink.sdi.getGridOn returns the grid
configuration for time plots in the Simulation Data Inspector. By default, the Simulation
Data Inspector shows horizontal and vertical grid lines.
You can use Simulink.sdi.setGridOn to configure the appearance of the grid for time plots in the Simulation Data Inspector. By default, the Simulation Data Inspector shows horizontal and vertical grid lines.
This example starts by showing how to use Simulink.sdi.getGridOn to access the current grid configuration. The subsequent sections show the code for each configuration option for time plot grid in the Simulation Data Inspector. To see the result, the example uses a Simulink.sdi.CustomSnapshot object to specify settings for the output of the Simulink.sdi.snapshot function.
Before modifying the grid display preferences, you can save the current configuration to a variable in the workspace in case you want to restore the preferences later.
gridInit = Simulink.sdi.getGridOn;
Configure Horizontal Grid Lines
Show only horizontal grid lines in the Simulation Data Inspector.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.