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 can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.