visType = Simulink.sdi.getVisualization(r,c)
returns the visualization type, visType, for the subplot at the location
specified by r and c in the Simulation Data Inspector
subplot layout.
Suppose you want to visualize route and speed data in the Simulation Data
using a map visualization, an XY plot of the longitude and latitude data, and a time
plot of the speed data. You can use the
Simulink.sdi.setVisualization function and the
Simulink.sdi.getVisualization function to programmatically set
and get the visualization type for a subplot. For more information about the route and
speed data used in this example, see View and Replay Map Data.
When subplots are in a grid layout, use the row and column indexing of each
subplot to set the visualization type. For example, using a 3-by-1 subplot layout,
set the top subplot to a map visualization, the middle subplot to an XY plot, and
the bottom subplot to a time plot. Then, plot the data.
You can also set the visualization type when using a split three-plot basic layout. For example, using a split top three-plot layout, set the top-left subplot to an XY plot, the top-right subplot to a time plot, and the bottom subplot to a map. Then, plot the data.
When you use an overlay subplot layout, the indexing remains the same regardless of the orientation. Consider an overlay layout with the overlays located at the top of the main subplot. Set the main subplot to a map visualization, the top-left overlay to an XY plot, and the top-right overlay to a time plot.
Subplot row index, specified as an integer between 1 and
8, inclusive. Use the r and c
inputs together to specify the location of the subplot for which you want to get the
visualization type. For more information about how the Simulation Data Inspector indexes
subplots, see Moving Between Subplot Layouts.
Subplot column index, specified as an integer value between 1 and
8, inclusive. Use the r and c
inputs together to specify the location of the subplot for which you want to get the
visualization type. For more information about how the Simulation Data Inspector indexes
subplots, see Moving Between Subplot Layouts.
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.