Main Content

plot

Plot tire data

Since R2023b

    Description

    plot(obj) plots tireData objects specified by obj.

    plot(___, Name=Value) specifies additional options using one or more name-value arguments. For example, to show a legend on a plot, set ShowLegend to true.

    Input Arguments

    collapse all

    Tire data, specified as a tireData object or an array of tireData objects.

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: plot(tdata,DataVariableNames="kappa")

    Data variable names, specified as an array of strings. DataVariableNames must be a data channel property of tireData object.

    • If one variable name is passed, the variable is set as the y-axis channel, and the x-coordinate is defined as 1:length(Y).

    • If two variable names are passed, the order is [x-axis variable, y-axis variable].

    • If three variables names are passed, the order is [x-axis variable, y-axis variable, z-axis variable].

    Note

    If no variable names are passed, an autoplot function runs to generate the most appropriate plots for the tireData object. The autoplot function is limited to plotting steady-state and single-channel sweep maneuvers.

    Example: DataVariableNames=["kappa", "Fx"]

    Data Types: string

    Option to color by value, specified as a string to determine how line colors and legend values are assigned. String values must be a property of the tireData object.

    Note

    If the ColorBy value is a data channel, the mean value for each tireData object will be used to differentiate the color groups.

    Example: ColorBy="Fz"

    Data Types: string

    Option to filter tire data, specified a string array. String value must be a property of tireData.

    Note

    The FilterBy name-value argument must be used with the FilterByValues name-value argument. The FilterBy string array must be the same length as the FilterByValues cell array.

    Example: FilterBy=["TireSize", "Fz"]

    Data Types: string

    Option to filter tireData objects by values, specified as a cell array. The FilterByValue cell data type must be a string or a double depending on the tireData property defined in the FilterBy string array.

    • For data channels, the FilterByValue must be a two-element double. tireData objects with a mean value for the FilterBy channel outside of the range specified in the FilterByValue are excluded from the plot.

    • For tireData properties that are not data channels, the FilterByValue must be a string array. tireData objects with a property value that is not a member of the FilterByValue array are excluded from the plot.

    Note

    The FilterByValues name-value argument must be used with the FilterBy name-value argument. The FilterByValues cell array must be the same length as the FilterBy string array.

    Example: FilterByValues={"235/45R18", [3000,8000]}

    Data Types: double | string

    Parent container or axes in which to draw the plot, specified as an axes, figure, panel, or tab object. If you do not specify Parent, a new figure is created.

    Note

    If you specify Data without specifying DataVariableNames, the parent must be a valid tab container if you are generating a tabbed plot.

    Plot title, specified as a string.

    Example: Title="Plot Title"

    Data Types: string

    Plot subtitle, specified as a string.

    Example: Subtitle="Plot subtitle"

    Data Types: string

    Option to show legend, specified as true or false.

    Example: ShowLegend=true

    Data Types: logical

    Line style, specified as one of these values:

    • none

    • '-'

    • '--'

    • ':'

    • '-.'

    Example: LineStyle="-"

    Data Types: string

    Line width, specified a positive value.

    Example: LineWidth=1

    Marker, specified as one of these values:

    • "o"

    • "+"

    • "*"

    • "x"

    • "-"

    • "|"

    • "square"

    • "diamond"

    • "^"

    • "v"

    • ">"

    • "<"

    • "pentagram"

    • "hexagram"

    • "none"

    Example: Marker="square"

    Data Types: string

    Marker size, specified as a positive value.

    Example: MarkerSize=6

    Tire model, specified as a tireModel object or an array of tireModel objects with a maximum length of four.

    Version History

    Introduced in R2023b