Main Content

violinplot

Plot tire data in tiled violin plot

Since R2026a

    Description

    Add-On Required: This feature requires the Extended Tire Features for Vehicle Dynamics Blockset add-on.

    violinplot(obj) plots a tireData object in a tiled violin plot.

    example

    violinplot(___,Name=Value) specifies additional options using one or more name-value arguments.

    example

    Examples

    collapse all

    Create a violin plot from tire measurement data.

    Import tire data to plot.

    td=tireData.import("sample_tire_data.tdx");

    Create a violin plot with default options.

    violinplot(td);

    Figure contains 6 axes objects. Axes object 1 with xlabel Normal force, ylabel Normal force [N] contains an object of type violinplot. Axes object 2 with xlabel Inflation pressure, ylabel Inflation pressure [Pa] contains an object of type violinplot. Axes object 3 with xlabel Slip angle, ylabel Slip angle [rad] contains an object of type violinplot. Axes object 4 with xlabel Inclination angle, ylabel Inclination angle [rad] contains an object of type violinplot. Axes object 5 with xlabel Longitudinal slip, ylabel Longitudinal slip [] contains an object of type violinplot. Axes object 6 with xlabel Total velocity, ylabel Total velocity [m/s] contains an object of type violinplot.

    Create a violin plot from tire measurement data and specify a title, subtitle, and tire data channels.

    Import tire data to plot.

    td=tireData.import("sample_tire_data.tdx");

    Create a violin plot with a title and subtitle.

    violinplot(td,Title="Example Violin Plot",Subtitle="With a Subtitle");

    Figure contains 6 axes objects. Axes object 1 with xlabel Normal force, ylabel Normal force [N] contains an object of type violinplot. Axes object 2 with xlabel Inflation pressure, ylabel Inflation pressure [Pa] contains an object of type violinplot. Axes object 3 with xlabel Slip angle, ylabel Slip angle [rad] contains an object of type violinplot. Axes object 4 with xlabel Inclination angle, ylabel Inclination angle [rad] contains an object of type violinplot. Axes object 5 with xlabel Longitudinal slip, ylabel Longitudinal slip [] contains an object of type violinplot. Axes object 6 with xlabel Total velocity, ylabel Total velocity [m/s] contains an object of type violinplot.

    Create a violin plot that specifies tire data channels to plot.

    violinplot(td,Title="Example Violin Plot", ...
        Subtitle="Only show channels of interest", ...
        Channels=["Fz","alpha","gamma"]);

    Figure contains 3 axes objects. Axes object 1 with xlabel Normal force, ylabel Normal force [N] contains an object of type violinplot. Axes object 2 with xlabel Slip angle, ylabel Slip angle [rad] contains an object of type violinplot. Axes object 3 with xlabel Inclination angle, ylabel Inclination angle [rad] contains an object of type violinplot.

    Input Arguments

    collapse all

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

    Name-Value Arguments

    collapse all

    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: violinplot(td, Channels=["Fx", "Fy"])

    Tire data channels, specified as a vector of strings.

    Example: violinplot(td, Channels=["Fx", "Fy"])

    Data Types: string

    Parent container, specified as a Figure, Panel, Tab, or TiledChartLayout object. If Parent is not specified, a new figure is created.

    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

    Version History

    Introduced in R2026a