主要内容

VariabilityChart Properties

R2026b

Variability chart appearance and behavior

Since R2026b

VariabilityChart properties control the appearance and behavior of a VariabilityChart object. By changing property values, you can modify certain aspects of the object. Use dot notation to query and set properties.

v = variabilitychart({["A" "A" "B" "B"], [1 2 1 2]}, randi(100,1,4));
f = v.FactorNames;
v.Color = [0 0.5 0.5];

Data Display

expand all

Factor names, specified as a string array, cell array of character vectors, or categorical array. FactorNames must have one name for each cell in Factors.

The factor names are displayed along the y-axis of the chart in line with each factors' level names. To remove factor names from the chart, specify an empty cell array ({}) for FactorNames.

If you pass a table to variabilitychart during creation, FactorNames is the names of the table variables specified in FactorVariables by default. If you pass a cell array or vector to variabilitychart during creation, FactorNames is {'Factor1','Factor2',...,'Factorn'}, where n is the number of factors by default.

Example: FactorNames=["F1","F2","F3"]

Data Types: char | string | cell | categorical

How FactorNames is set, specified as one of these values:

  • "auto" — MATLAB® determines and sets the value of FactorNames based on the syntax used to create the VariabilityChart.

  • "manual" — You set the value of FactorNames manually, either by specifying the factor names when you create a VariabilityChart object or by setting the FactorNames property after creating the object.

If you change the value of FactorNames manually, the software changes the value of the FactorNamesMode property to "manual".

Example: FactorNamesMode="manual"

Display names of the factor levels, specified as a cell array of vectors. Each cell in LevelsDisplayNames corresponds to a factor and must contain a vector with one element for each unique level in that factor. The level names are displayed in rows by factor along the x-axis.

The default value of LevelsDisplayNames is Levels. Use LevelsDisplayNames to provide alternate display names to the level names stored in Levels.

Example: LevelsDisplayNames={["A1","A2","A3"],["B1","B2"]}

Data Types: cell

How LevelsDisplayNames is set, specified as one of these values:

  • "auto" — MATLAB sets the value of LevelsDisplayNames to the value of Levels.

  • "manual" — You set the value of LevelsDisplayNames manually by setting the LevelsDisplayNames property after creating the object.

If you change the value of LevelsDisplayNames manually, the software changes the value of the LevelsDisplayNamesMode property to "manual".

Example: LevelsDisplayNamesMode="manual"

Indicator to add separators between the factor levels, specified as a positive integer or vector of positive integers. The integer values must be in the range [1,n] where n is the number of factors.

The software adds a vertical grid line separator when the level changes for each factor specified by FactorsWithSeparators. If the level changes because of a change to a factor not specified in FactorsWithSeparators, the software does not add a separator.

Example: FactorsWithSeparators=3

Data Types: single | double

Indicator to add boxes around the factor levels, specified as a positive integer or vector of positive integers. The integer values must be in the range [1,n] where n is the number of factors.

The software adds a box around the level data for each factor specified by FactorsWithBoxes.

Example: FactorsWithBoxes=2

Data Types: single | double

Indicator to add mean lines to the factor levels, specified as a positive integer or vector of positive integers. The integer values must be in the range [1,n] where n is the number of factors.

The software adds horizontal lines at the mean value of each level for each factor specified by FactorsWithMeans.

Example: FactorsWithMeans=1

Data Types: single | double

Indicator to color the factor levels, specified as a positive integer. The integer value must be in the range [1,n] where n is the number of factors.

The software uses the ColorOrder property to set a different color to each of the levels in the specified factor. This property is valid only when Color is "flat".

Example: FactorWithColors=4

Data Types: single | double

Target value, specified as a numeric scalar. The software adds a horizontal line at y = TargetValue.

Example: TargetValue=12

Data Types: single | double

y-axis limits, specified as a two-element numeric vector. You can also use the ylim function to set YLimits. By default, the values are derived from the YData values.

Example: YLimits=[10 50]

Data Types: single | double

How the YLimits property is set, specified as one of these values:

  • "auto" — MATLAB controls the value of YLimits by calculating it automatically.

  • "manual" — You set the value of YLimits manually, either by specifying the values when you create a VariabilityChart object or by setting the YLimits property after creating the object.

If you change the value of YLimits manually, the software changes the value of the YLimitsMode property to "manual".

Example: YLimitsMode="manual"

Labels

expand all

Chart title, specified as a character vector, cell array of character vectors, string array, or categorical array. To create a multiline title, specify a cell array of character vectors, a string array, or a categorical array. Each element in the array corresponds to a line of text.

By default, VariabilityChart objects support a subset of TeX markup for the text you specify. Use TeX markup to add superscripts and subscripts, modify the font type and color, and include special characters in the text. If you want a TeX markup character in regular text, such as an underscore (_), then insert a backslash (\) before the character you want to include. The backslash is the TeX escape character. For more information, see the Interpreter property of the text object.

Alternatively, use the title function to add a title to the chart.

Example: Title="Chart Title"

Data Types: char | string | cell | categorical

Chart subtitle, specified as a character vector, cell array of character vectors, string array, or categorical array. To create a multiline subtitle, specify a cell array of character vectors, a string array, or a categorical array. Each element in the array corresponds to a line of text.

By default, VariabilityChart objects support a subset of TeX markup for the text you specify. Use TeX markup to add superscripts and subscripts, modify the font type and color, and include special characters in the text. If you want a TeX markup character in regular text, such as an underscore (_), then insert a backslash (\) before the character you want to include. The backslash is the TeX escape character. For more information, see the Interpreter property of the text object.

Alternatively, use the title or subtitle functions to add a subtitle to the chart.

Example: Subtitle="Chart Subitle"

Data Types: char | string | cell | categorical

Label for the x-axis, specified as a character vector, cell array of character vectors, string array, or categorical array. To create a multiline label, specify a cell array of character vectors, a string array, or a categorical array. Each element in the array corresponds to a line of text. You can also use the xlabel function to set XLabel.

By default, VariabilityChart objects support a subset of TeX markup for the text you specify. Use TeX markup to add superscripts and subscripts, modify the font type and color, and include special characters in the text. If you want a TeX markup character in regular text, such as an underscore (_), then insert a backslash (\) before the character you want to include. The backslash is the TeX escape character. For more information, see the Interpreter property of the text object.

Example: XLabel="X Axis"

Data Types: char | string | cell | categorical

Label for the y-axis, specified as a character vector, cell array of character vectors, string array, or categorical array. To create a multiline label, specify a cell array of character vectors, a string array, or a categorical array. Each element in the array corresponds to a line of text. You can also use the ylabel function to set YLabel.

By default, VariabilityChart objects support a subset of TeX markup for the text you specify. Use TeX markup to add superscripts and subscripts, modify the font type and color, and include special characters in the text. If you want a TeX markup character in regular text, such as an underscore (_), then insert a backslash (\) before the character you want to include. The backslash is the TeX escape character. For more information, see the Interpreter property of the text object.

Example: YLabel="Y Axis"

Data Types: char | string | cell | categorical

How the YLabel property is set, specified as one of these values:

  • "auto" — MATLAB sets the value of YLabel to YVariable.

  • "manual" — You set the value of YLabel manually, either by specifying the y-axis label when you create a VariabilityChart object or by setting the YLabel property after creating the object.

If you change the value of YLabel manually, the software changes the value of the YLabelMode property to "manual".

Example: YLabelMode="manual"

Label for the target value line, specified as a string scalar or character vector. The software displays the label to the right of the y-axis followed by the value of TargetValue. Set TargetValueLabel to an empty string ("") to remove the label from the chart.

Example: TargetValueLabel="ProductionTarget"

Data Types: char | string

How the TargetValueLabel property is set, specified as one of these values:

  • "auto" — MATLAB sets the value of TargetValueLabel to "Target value:".

  • "manual" — You set the value of TargetValueLabel manually, either by specifying the target value label when you create a VariabilityChart object or by setting the TargetValueLabel property after creating the object.

If you change the value of TargetValueLabel manually, the software changes the value of the TargetValueLabelMode property to "manual".

Example: TargetValueLabelMode="manual"

Text interpreter, specified as one of these values:

  • "tex" — Interpret characters using a subset of TeX markup.

  • "latex" — Interpret characters using LaTeX markup.

  • "none" — Display literal characters.

MATLAB uses the interpreter when displaying a chart title, axis labels, or any data that includes text or symbols.

TeX Markup

By default, MATLAB supports a subset of TeX markup. Use TeX markup to add superscripts and subscripts, modify the font type and color, and include special characters in the text.

Modifiers remain in effect until the end of the text. Superscripts and subscripts are an exception because they modify only the next character or the characters within the curly braces. When you set the interpreter to "tex", the supported modifiers are as follows.

ModifierDescriptionExample
^{ }Superscript"text^{superscript}"
_{ }Subscript"text_{subscript}"
\bfBold font"\bf text"
\itItalic font"\it text"
\slOblique font (usually the same as italic font)"\sl text"
\rmNormal font"\rm text"
\fontname{specifier}Font name — Replace specifier with the name of a font family. You can use this in combination with other modifiers."\fontname{Courier} text"
\fontsize{specifier}Font size —Replace specifier with a numeric scalar value in point units."\fontsize{15} text"
\color{specifier}Font color — Replace specifier with one of these colors: red, green, yellow, magenta, blue, black, white, gray, darkGreen, orange, or lightBlue."\color{magenta} text"
\color[rgb]{specifier}Custom font color — Replace specifier with a three-element RGB triplet."\color[rgb]{0,0.5,0.5} text"

This table lists the supported special character sequences for the "tex" interpreter. Some of the symbols look slightly different than they do in MATLAB.

Character SequenceSymbolCharacter SequenceSymbolCharacter SequenceSymbol

\alpha

α

\upsilon

υ

\sim

~

\angle

\phi

ϕ

\leq

\ast

*

\chi

χ

\infty

\beta

β

\psi

ψ

\clubsuit

\gamma

γ

\omega

ω

\diamondsuit

\delta

δ

\Gamma

Γ

\heartsuit

\epsilon

ϵ

\Delta

Δ

\spadesuit

\zeta

ζ

\Theta

Θ

\leftrightarrow

\eta

η

\Lambda

Λ

\leftarrow

\theta

θ

\Xi

Ξ

\Leftarrow

\vartheta

ϑ

\Pi

Π

\uparrow

\iota

ι

\Sigma

Σ

\rightarrow

\kappa

κ

\Upsilon

ϒ

\Rightarrow

\lambda

λ

\Phi

Φ

\downarrow

\mu

µ

\Psi

Ψ

\circ

º

\nu

ν

\Omega

Ω

\pm

±

\xi

ξ

\forall

\geq

\pi

π

\exists

\propto

\rho

ρ

\ni

\partial

\sigma

σ

\cong

\bullet

\varsigma

ς

\approx

\div

÷

\tau

τ

\Re

\neq

\equiv

\oplus

\aleph

\Im

\cup

\wp

\otimes

\subseteq

\oslash

\cap

\in

\supseteq

\supset

\lceil

\subset

\int

\cdot

·

\o

ο

\rfloor

\neg

¬

\nabla

\lfloor

\times

x

\ldots

...

\perp

\surd

\prime

´

\wedge

\varpi

ϖ

\0

\rceil

\rangle

\mid

|

\vee

\langle

\copyright

©

LaTeX Markup

To use LaTeX markup, set the interpreter to "latex". For inline mode, surround the markup with single dollar signs ($). For display mode, surround the markup with double dollar signs ($$).

LaTeX ModeExampleResult
Inline

"$\int_1^{20} x^2 dx$"

Equation with LaTeX inline mode

Display

"$$\int_1^{20} x^2 dx$$"

Equation with LaTeX display mode

The displayed text uses the default LaTeX font style. To change the font style, use LaTeX markup.

The maximum size of the text that you can use with the LaTeX interpreter is 1200 characters. For multiline text, this reduces by about 10 characters per line.

MATLAB supports most standard LaTeX math mode commands. For more information, see Supported LaTeX Commands. For examples that use TeX and LaTeX, see Greek Letters and Special Characters in Chart Text.

Color and Styling

expand all

Marker color, specified as a value from this table

FaceColor ValueDescription
"flat"

Let MATLAB assign marker colors. The colors are defined in the ColorOrder property of the chart.

RGB triplet or hexadecimal color code

Assign a custom color to all the markers:

  • RGB triplet — A three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range [0,1]; for example, [0.4 0.6 0.7].

  • Hexadecimal color code — A character vector or a string scalar that starts with a hash symbol (#) followed by three or six hexadecimal digits, which can range from 0 to F. The values are not case sensitive. Thus, the color codes "#FF8800", "#ff8800", "#F80", and "#f80" are equivalent.

The two tables below provide the RGB triplets and hexadecimal color codes for some common colors.

Color name or short name

Assign one predefined color to all the markers using a color name such as "red", or a short name such as "r".

The table below lists the available color names and short names.

"none"

Display all markers without any color.

Color NameShort NameRGB TripletHexadecimal Color CodeAppearance
"red""r"[1 0 0]"#FF0000"

Sample of the color red

"green""g"[0 1 0]"#00FF00"

Sample of the color green

"blue""b"[0 0 1]"#0000FF"

Sample of the color blue

"cyan" "c"[0 1 1]"#00FFFF"

Sample of the color cyan

"magenta""m"[1 0 1]"#FF00FF"

Sample of the color magenta

"yellow""y"[1 1 0]"#FFFF00"

Sample of the color yellow

"black""k"[0 0 0]"#000000"

Sample of the color black

"white""w"[1 1 1]"#FFFFFF"

Sample of the color white

"none"Not applicableNot applicableNot applicableNo color

This table lists the default color palettes for plots in the light and dark themes.

PalettePalette Colors

"gem" — Light theme default

Before R2025a: Most plots use these colors by default.

Sample of the "gem" color palette

"glow" — Dark theme default

Sample of the "glow" color palette

You can get the RGB triplets and hexadecimal color codes for these palettes using the orderedcolors and rgb2hex functions. For example, get the RGB triplets for the "gem" palette and convert them to hexadecimal color codes.

RGB = orderedcolors("gem");
H = rgb2hex(RGB);

Before R2024a: Get the hexadecimal color codes using H = compose("#%02X%02X%02X",round(RGB*255)).

Before R2023b: Get the RGB triplets using RGB = get(groot,"FactoryAxesColorOrder").

Example: Color="#f00355"

Data Types: char | string | double

Color order, specified as a three-column matrix of RGB triplets. This property defines the palette of colors MATLAB uses to color the data points by the factor specified by FactorWithColors. Each row of the array is an RGB triplet. An RGB triplet is a three-element vector whose elements specify the intensities of the red, green, and blue components of a color. The intensities must be in the range [0, 1]. This table lists the default colors.

ColorsColorOrder Matrix

Colors of the default MATLAB color order, shown in line with the RGB triplet matrix.


    [    0    0.4470    0.7410
    0.8500    0.3250    0.0980
    0.9290    0.6940    0.1250
    0.4940    0.1840    0.5560
    0.4660    0.6740    0.1880
    0.3010    0.7450    0.9330
    0.6350    0.0780    0.1840]

MATLAB assigns colors to each level of the factor specified by the FactorWithColors property according to the order of the levels.

An alternative way to set this property is to pass the VariabilityChart object to the colororder function.

How the ColorOrder property is set, specified as one of these values:

  • "auto" — MATLAB sets the value of ColorOrder to the default color order.

  • "manual" — You set the value of ColorOrder manually, either by specifying the color order when you create a VariabilityChart object or by setting the ColorOrder property after creating the object.

If you change the value of ColorOrder manually, the software changes the value of the ColorOrderMode property to "manual".

Example: ColorOrderMode="manual"

Font size, specified as a positive scalar. FontSize is the same for the title, labels, factor names, and level display names. The default font size depends on the specific operating system and locale.

As you adjust the size of plot elements, the software automatically updates the font size. However, changing the FontSize property disables this automatic resizing.

Example: v.FontSize = 12

How the FontSize property is set, specified as one of these values:

  • "auto" — MATLAB controls the value of FontSize by calculating it automatically.

  • "manual" — You set the value of FontSize manually, either by specifying the font size when you create a VariabilityChart object or by setting the FontSize property after creating the object.

If you change the value of FontSize manually, the software changes the value of the FontSizeMode property to "manual".

Example: FontSizeMode="manual"

Markers

expand all

Marker symbol, specified as one of the options listed in this table:

MarkerDescriptionResulting Marker
"o"Circle

Sample of circle marker

"+"Plus sign

Sample of plus sign marker

"*"Asterisk

Sample of asterisk marker

"."Point

Sample of point marker

"x"Cross

Sample of cross marker

"_"Horizontal line

Sample of horizontal line marker

"|"Vertical line

Sample of vertical line marker

"square"Square

Sample of square marker

"diamond"Diamond

Sample of diamond marker

"^"Upward-pointing triangle

Sample of upward-pointing triangle marker

"v"Downward-pointing triangle

Sample of downward-pointing triangle marker

">"Right-pointing triangle

Sample of right-pointing triangle marker

"<"Left-pointing triangle

Sample of left-pointing triangle marker

"pentagram"Pentagram

Sample of pentagram marker

"hexagram"Hexagram

Sample of hexagram marker

"none"No markersNot applicable

Example: Marker="x"

Data Types: char | string

Marker size, specified as a nonnegative scalar, with values measured in points. One point equals 1/72 inches.

Example: MarkerSize=30

Data Types: single | double |

State of marker face fill, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

  • "on" — Fill the interior of the markers.

  • "off" — Leave the interior of the markers empty.

Example: MarkerFilled="off"

Data Types: char | string

Marker transparency, specified as a numeric scalar with values between 0 and 1. Values closer to 0 specify more transparent markers, and values closer to 1 specify more opaque markers.

Example: MarkerAlpha=0.75

Data Types: single | double |

Data

expand all

Sample data, specified as a numeric vector. YData and all the factor variables must have the same length.

Data Types: single | double

How the YData property is set, specified as one of these values:

  • "auto" — The YData property updates automatically based on the SourceTable and YVariable properties. This is the case when you pass a table to variabilitychart during creation.

  • "manual" — The YData property is set directly and does not update automatically. This is the case when you pass data values as a vector to variabilitychart during creation.

Example: YDataMode="manual"

Factor variables, specified as a numeric vector, logical vector, categorical vector, string array, cell array of character vectors, or cell array of vectors. Each factor variable must have the same length as YData.

Factors are sometimes called grouping variables. The variabilitychart function groups the observations in YData by their factor values. For more information on factors, see Grouping Variables.

Data Types: single | double | char | string | cell | categorical

How the Factors property is set, specified as one of these values:

  • "auto" — The Factors property updates automatically based on the SourceTableand FactorVariables properties. This is the case when you pass a table to variabilitychart during creation.

  • "manual" — The Factors property is set directly and does not update automatically. This is the case when you pass factor values as a vector or cell array to variabilitychart during creation.

Example: FactorsMode="manual"

Source table containing sample data and factors, specified as a table.

This property is valid only when you pass a table to variabilitychart during creation.

Data Types: table

Table variable containing the sample data, specified using one of the indexing schemes from the following table. The variable you specify must contain numeric values. When you set this property, MATLAB updates the YData property.

This table lists the different indexing schemes you can use to specify the table variable.

Indexing SchemeExamples

Variable name:

  • A string scalar or character vector.

  • A pattern object. The pattern object must refer to only one variable.

  • "A" or 'A' — A variable named A

  • "Var"+digitsPattern(1) — The variable with the name "Var" followed by a single digit

Variable index:

  • An index number that refers to the location of a variable in the table.

  • A logical vector. Typically, this vector is the same length as the number of variables, but you can omit trailing 0 or false values.

  • 3 — The third variable from the table

  • [false false true] — The third variable

Variable type:

  • A vartype subscript that selects a table variable of a specified type. The subscript must refer to only one variable.

  • vartype("double") — The variable containing double values

Example: YVariable=3

Table variables containing factors, specified using one of the indexing schemes from the following table. When you set this property, MATLAB updates the Factors property.

This table lists the different indexing schemes you can use to specify the table variable.

Indexing SchemeExamples

Variable name:

  • A string scalar or character vector.

  • A pattern object. The pattern object must refer to only one variable.

  • "A" or 'A' — A variable named A

  • "Var"+digitsPattern(1) — The variable with the name "Var" followed by a single digit

Variable index:

  • An index number that refers to the location of a variable in the table.

  • A logical vector. Typically, this vector is the same length as the number of variables, but you can omit trailing 0 or false values.

  • 3 — The third variable from the table

  • [false false true] — The third variable

Variable type:

  • A vartype subscript that selects a table variable of a specified type. The subscript must refer to only one variable.

  • vartype("double") — The variable containing double values

Example: FactorVariables=[1,2,3]

This property is read-only.

Factor levels, specified as a cell array of vectors. Levels must have the same number of cells as Factors. Each cell of Levels is a list of the categories found in the corresponding cell of Factors.

The variabilitychart function automatically determines and sets the value of Levels. To update the factor level labels displayed on the chart, use the LevelsDisplayNames property.

Data Types: cell

Position

expand all

Position property to hold constant when adding, removing, or changing decorations, specified as one of the following values:

  • "outerposition" — The OuterPosition property remains constant when you add, remove, or change decorations such as a title or an axis label. If any positional adjustments are needed, MATLAB adjusts the InnerPosition property.

  • "innerposition" — The InnerPosition property remains constant when you add, remove, or change decorations such as a title or an axis label. If any positional adjustments are needed, MATLAB adjusts the OuterPosition property.

Outer size and position of the variability chart within the parent container (typically a figure, panel, or tab), specified as a four-element numeric vector of the form [left bottom width height]. The default value of [0 0 1 1] includes the whole interior of the container.

Example: OuterPosition=[0.25 0.25 0.5 0.5]

Data Types: single | double

Inner size and position of the chart within the parent container (typically a figure, panel, or tab), specified as a four-element numeric vector of the form [left bottom width height]. The inner position includes only the variability chart.

  • The left and bottom elements define the distance from the lower left corner of the container to the lower left corner of the chart.

  • The width and height elements are the dimensions of the chart.

Example: InnerPosition=[0.25 0.25 0.5 0.5]

Data Types: single | double

Inner size and position of the chart within the parent container (typically a figure, panel, or tab), specified as a four-element numeric vector of the form [left bottom width height]. This property is equivalent to the InnerPosition property.

Example: Position=[0.25 0.25 0.5 0.5]

Data Types: single | double

Position units, specified as one of these values.

ValueDescription
"normalized" (default)Normalized with respect to the container, which is typically the figure or a panel. The lower left corner of the container maps to (0,0), and the upper right corner maps to (1,1).
"inches"Inches.
"centimeters"Centimeters.
"characters"

Based on the default uicontrol font of the graphics root object:

  • Character width = width of letter x.

  • Character height = distance between the baselines of two lines of text.

"points"Typography points. One point equals 1/72 inch.
"pixels"

Pixels.

On Windows® and Macintosh systems, the size of a pixel is 1/96th of an inch. This size is independent of your system resolution.

On Linux® systems, the size of a pixel is determined by your system resolution.

When specifying the units as a name-value pair during object creation, you must set the Units property before specifying the properties that you want to use these units for, such as OuterPosition.

Example: Units="points"

Data Types: char | string

Layout

expand all

Display the axes toolbar, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

  • "on" — Display the toolbar.

  • "off" — Do not display the toolbar.

Example: ToolbarVisible="off"

Data Types: logical | char | string

State of visibility, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

  • "on" — Display the variability chart.

  • "off" — Hide the variability chart without deleting it. You still can access the properties of an invisible object.

Example: Visible="off"

Data Types: logical | char | string

Layout options, specified as a TiledChartLayoutOptions or GridLayoutOptions object. This property is useful when the chart is either in a tiled chart layout or a grid layout.

To position the chart within the grid of a tiled chart layout, set the Tile and TileSpan properties on the TiledChartLayoutOptions object. For example, consider a 3-by-3 tiled chart layout. The layout has a grid of tiles in the center, and four tiles along the outer edges. In practice, the grid is invisible and the outer tiles do not take up space until you populate them with axes or charts.

Diagram of a 3-by-3 tiled chart layout.

This code places the chart c in the third tile of the grid.

c.Layout.Tile = 3;

To make the chart span multiple tiles, specify the TileSpan property as a two-element vector. For example, this chart spans 2 rows and 3 columns of tiles.

c.Layout.TileSpan = [2 3];

To place the chart in one of the surrounding tiles, specify the Tile property as "north", "south", "east", or "west". For example, setting the value to "east" places the chart in the tile to the right of the grid.

c.Layout.Tile = "east";

To place the chart into a layout within an app, specify this property as a GridLayoutOptions object. For more information about working with grid layouts in apps, see uigridlayout.

If the chart is not a child of either a tiled chart layout or a grid layout (for example, if it is a child of a figure or panel) then this property is empty and has no effect.

Parent/Child

expand all

Parent container, specified as a Figure, Panel, Tab, TiledChartLayout, or GridLayout object.

Visibility of the VariabilityChart object handle in the Children property of the parent, specified as one of these values:

  • "on" — Object handle is always visible.

  • "off" — Object handle is always invisible. This option is useful for preventing unintended changes to the UI by another function. To temporarily hide the handle during the execution of that function, set the HandleVisibility to "off".

  • "callback" — Object handle is visible from within callbacks or functions invoked by callbacks, but not from within functions invoked from the command line. This option blocks access to the object at the command line, but allows callback functions to access it.

If the object is not listed in the Children property of the parent, then functions that obtain object handles by searching the object hierarchy or querying handle properties cannot return the object. These functions include get, findobj, gca, gcf, gco, newplot, cla, clf, and close.

Hidden object handles are still valid. Set the root ShowHiddenHandles property to "on" to list all object handles, regardless of their HandleVisibility property setting.

Example: HandleVisibility="callback"

Data Types: char | string

Version History

Introduced in R2026b