Main Content

Simulink.sdi.getSubPlotLayout

Get subplot layout in Simulation Data Inspector

Since R2023b

    Description

    Simulink.sdi.getSubPlotLayout returns a 1-by-2 row vector whose elements are the number of rows and number of columns, respectively, in the grid layout of subplots in the Simulation Data Inspector.

    example

    [r,c] = Simulink.sdi.getSubPlotLayout returns the number of rows r and columns c in the grid layout of subplots.

    Examples

    collapse all

    Use the Simulink.sdi.getSubPlotLayout function to return the number of rows and columns in the subplot layout of the Simulation Data Inspector.

    [r,c] = Simulink.sdi.getSubPlotLayout
    r =
    
      int32
    
       2
    
    
    c =
    
      int32
    
       1

    Output Arguments

    collapse all

    Number of rows in the subplot grid layout, specified as a positive integer between 1 and 8, inclusive.

    Number of columns in the subplot grid layout, specified as a positive integer between 1 and 8, inclusive.

    Limitations

    • The function returns 2 rows and 2 columns when the Simulation Data Inspector has a three-plot layout or a plot with overlays.

    Version History

    Introduced in R2023b