BodePlot Properties
BodePlot
properties control the appearance and behavior of Bode
plots created using the bodeplot
function. By changing property values, you can modify certain aspects
of the plot.
bp = bodeplot(sys);
bp.FrequencyPeakResponse.Visible = "on";
For more information, see Customize Linear Analysis Plots at Command Line.
Response
Model responses, specified as a BodeResponse
object or an array of such
objects. Use this property to modify the dynamic system model or
the appearance for each response in the plot. Each
BodeResponse
object has these
properties.
Source data for the response, specified as a structure with these fields.
Dynamic system, specified as a SISO or MIMO dynamic system model or an array of dynamic system models.
When you initially create a plot, Model
matches the value you specify for sys
.
Frequencies at which to compute the response, specified as one of the se values:
Cell array of the form
{wmin,wmax}
— Compute the response at frequencies in the range fromwmin
towmax
.Vector of frequencies — Compute the response at each specified frequency. For example, use
logspace
to generate a row vector with logarithmically spaced frequency values. The vectorw
can contain both positive and negative frequencies.[]
— Automatically select frequencies based on system dynamics.
Specify frequencies in units of rad/TimeUnit
, where TimeUnit
is the TimeUnit
property of the model.
When you initially create a plot:
FrequencySpec
matches the value you specify for thew
argument.If you do not specify
w
,FrequencySpec
is empty and frequencies are selected based on the system dynamics.
Response name, specified as a string or character vector and stored as a string.
Response visibility, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Display the response in the plot."off"
,0
, orfalse
— Do not display the response in the plot.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Option to list the response in the legend, specified as one of these logical on/off values:
"on"
,1
, ortrue
— List the response in the legend."off"
,0
, orfalse
— Do not list the response in the legend.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Marker style, specified as one of these values.
Marker | Description |
---|---|
"none" | No marker |
"o" | Circle |
"+" | Plus sign |
"*" | Asterisk |
"." | Point |
"x" | Cross |
"_" | Horizontal line |
"|" | Vertical line |
"s" | Square |
"d" | Diamond |
"^" | Upward-pointing triangle |
"v" | Downward-pointing triangle |
">" | Right-pointing triangle |
"<" | Left-pointing triangle |
"p" | Pentagram |
"h" | Hexagram |
Plot color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
Line style, specified as one of these values.
Line Style | Description |
---|---|
"-" | Solid line |
"--" | Dashed line |
":" | Dotted line |
"-." | Dash-dotted line |
Marker size, specified as a positive scalar.
Line width, specified as a positive scalar.
Response characteristics to display in the plot, specified as a
CharacteristicsManager
object with these properties.
Visibility of peak response in magnitude plot, specified as a
CharacteristicOption
object with this property.
Peak response visibility, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Display the peak response."off"
,0
, orfalse
— Do not display the peak response.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Visibility of all stability margins, specified as a CharacteristicOption
object with this property.
Margin visibility, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Display the margins."off"
,0
, orfalse
— Do not display the margins.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Visibility of minimum stability margins, specified as a CharacteristicOption
object with this property.
Margin visibility, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Display the margins."off"
,0
, orfalse
— Do not display the margins.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Confidence region for identified models, specified as a
CharacteristicOption
object with these properties.
Confidence region visibility, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Display the confidence region."off"
,0
, orfalse
— Do not display the confidence region.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Number of standard deviations to display for the confidence region, specified as a positive scalar.
Dependencies
ConfidenceRegion
is supported only for identified
models, which require System Identification Toolbox™ software.
Option to display magnitude plot, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Display the magnitude plot."off"
,0
, orfalse
— Hide the magnitude plot.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Option to display phase plot, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Display the phase plot."off"
,0
, orfalse
— Hide the phase plot.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Option to enable minimum gain for plotting, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Set the minimum gain for plotting to theMinimumGainValue
property value."off"
,0
, orfalse
— Set the minimum gain for plotting automatically based on the system dynamics.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Dependencies
The default minimum-gain configuration depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Minimum gain value for plotting, specified as a scalar.
Dependencies
To apply the minimum gain value, set the
MinimumGainEnabled
property to"on"
.The default minimum-gain configuration depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Dependencies
Units and Scaling
Frequency units, specified as one of these values:
"Hz"
"rad/s"
"rpm"
"kHz"
"MHz"
"GHz"
"rad/nanosecond"
"rad/microsecond"
"rad/millisecond"
"rad/minute"
"rad/hour"
"rad/day"
"rad/week"
"rad/month"
"rad/year"
"cycles/nanosecond"
"cycles/microsecond"
"cycles/millisecond"
"cycles/hour"
"cycles/day"
"cycles/week"
"cycles/month"
"cycles/year"
Dependencies
By default, the response uses the frequency units of the plotted linear system. You can override the default units by specifying toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Frequency scale, specified as either "log"
or "linear"
.
Dependencies
The default frequency scale depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Magnitude units, specified as one of these values:
"dB"
— Decibels"abs"
— Absolute value
Dependencies
If
MagnitudeScale
is"log"
when you setMagnitudeUnit
to"dB"
, the software automatically changesMagnitudeScale
to"linear"
.The default magnitude units depend on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Magnitude scale, specified as either "log"
or "linear"
.
Dependencies
Setting
MagnitudeScale
to"log"
is not supported whenMagnitudeUnit
is"dB"
.The default magnitude scale depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Phase units, specified as one of these values:
"deg"
— Degrees"rad"
— Radians
Dependencies
The default phase units depend on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Phase Wrapping and Branching
Option to enable phase wrapping, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Enable phase wrapping. The phase shown in the response wraps to remain in the range defined byPhaseWrappingBranch
."off"
,0
, orfalse
— Disable phase wrapping.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Dependencies
The default phase-wrapping configuration depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
When both phase wrapping and phase matching are enabled, the software performs the phase matching followed by the phase wrapping.
Lower limit of phase-wrapping range, specified as a scalar value in degrees. The phase-wrapping range is [B,B+360), where B is equal to PhaseWrappingBranch
.
Dependencies
This value is ignored when
PhaseMatchingEnabled
is"off"
.The default phase-wrapping configuration depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Option to enable phase matching, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Enable phase matching such that the phase response matches the value specified inPhaseMatchingValue
at the frequency specified inPhaseMatchingFrequency
. The remaining phase response shifts to maintain the same phase profile."off"
,0
, orfalse
— Disable phase matching.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Dependencies
When both phase wrapping and phase matching are enabled, the software performs the phase matching followed by the phase wrapping.
Phase matching frequency, specified as a scalar.
Dependencies
This value is ignored when PhaseMatchingEnabled
is "off"
.
Phase matching response value, specified as a scalar.
Dependencies
This value is ignored when PhaseMatchingEnabled
is "off"
.
Inputs and Outputs
Input label text and style, specified as an AxesLabel
object or
an array of such objects. Each AxesLabel
object has these
properties.
Text value, specified as a string or character vector and stored as a string.
Font size in point units, specified as positive scalar. One point
equals 1/72
inch.
Dependencies
The default font size depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character thickness, specified as "bold"
or
"normal"
.
Not all fonts have a bold weight. Therefore, the bold font might look the same as the normal font.
Dependencies
The default font weight depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character slant, specified as "normal"
or
"italic"
.
Not all fonts have an italic font styles. Therefore, the italic font might look the same as the normal font.
Dependencies
The default font angle depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Font name, specified as a string or character vector containing the
name of a system-supported font name. The default font depends on the
specific operating system and locale. To view a list of available system
fonts, use listfonts
.
Text color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
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.
Output label text and style, specified as an AxesLabel
object or an array of
such objects. Each AxesLabel
object has these properties.
Text value, specified as a string or character vector and stored as a string.
Font size in point units, specified as positive scalar. One point
equals 1/72
inch.
Dependencies
The default font size depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character thickness, specified as "bold"
or
"normal"
.
Not all fonts have a bold weight. Therefore, the bold font might look the same as the normal font.
Dependencies
The default font weight depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character slant, specified as "normal"
or
"italic"
.
Not all fonts have an italic font styles. Therefore, the italic font might look the same as the normal font.
Dependencies
The default font angle depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Font name, specified as a string or character vector containing the
name of a system-supported font name. The default font depends on the
specific operating system and locale. To view a list of available system
fonts, use listfonts
.
Text color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
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.
Option to display inputs, specified as one of these logical on/off values or an array of such values:
"on"
,1
, ortrue
— Display the corresponding input."off"
,0
, orfalse
— Hide the corresponding input.
InputVisible
is an array when the plotted system has multiple inputs. By
default, all inputs are visible in the plot.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
or an array of such values.
Option to display outputs, specified as one of these logical on/off values or an array of such values:
"on"
,1
, ortrue
— Display the corresponding output."off"
,0
, orfalse
— Hide the corresponding output.
OutputVisible
is an array when the plotted system has multiple outputs.
By default, all outputs are visible in the plot.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
or an array of such values.
Grouping of inputs and outputs pairs, specified as one of these values:
"none"
— Do not group inputs or outputs."inputs"
— Group only inputs."outputs"
— Group only outputs."all"
— Group all input-output pairs.
Title and Axis Labels
Title text and style, specified as an AxesLabel
object with these
properties.
Text value, specified as a string or character vector and stored as a string.
To specify a title with multiple lines, concatenate the lines into a single string using newline
.
myplot.Title.String = "first line" + newline + "second line";
Font size in point units, specified as positive scalar. One point equals 1/72
inch.
Dependencies
The default font size depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character thickness, specified as "bold"
or "normal"
.
Not all fonts have a bold weight. Therefore, the bold font might look the same as the normal font.
Dependencies
The default font weight depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character slant, specified as "normal"
or "italic"
.
Not all fonts have an italic font styles. Therefore, the italic font might look the same as the normal font.
Dependencies
The default font angle depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Font name, specified as a string or character vector containing the name of a system-supported font name. The default font depends on the specific operating system and locale. To view a list of available system fonts, use listfonts
.
Text color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
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.
Subtitle text and style, specified as an AxesLabel
object with these
properties.
Text value, specified as a string or character vector and stored as a string.
To specify a subtitle with multiple lines, concatenate the lines into a
single string using newline
.
myplot.Subtitle.String = "first line" + newline + "second line";
Font size in point units, specified as positive scalar. One point equals 1/72
inch.
Dependencies
The default font size depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character thickness, specified as "bold"
or "normal"
.
Not all fonts have a bold weight. Therefore, the bold font might look the same as the normal font.
Dependencies
The default font weight depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character slant, specified as "normal"
or "italic"
.
Not all fonts have an italic font styles. Therefore, the italic font might look the same as the normal font.
Dependencies
The default font angle depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Font name, specified as a string or character vector containing the name of a system-supported font name. The default font depends on the specific operating system and locale. To view a list of available system fonts, use listfonts
.
Text color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
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.
X-axis label text and style, specified as an
AxesLabel
object with these properties.
Text value, specified as a string or character vector and stored as a string.
To specify a label with multiple lines, concatenate the lines into a
single string using newline
.
myplot.XLabel.String = "first line" + newline + "second line";
Font size in point units, specified as positive scalar. One point equals
1/72
inch.
Dependencies
The default font size depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character thickness, specified as "bold"
or
"normal"
.
Not all fonts have a bold weight. Therefore, the bold font might look the same as the normal font.
Dependencies
The default font weight depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character slant, specified as "normal"
or
"italic"
.
Not all fonts have an italic font styles. Therefore, the italic font might look the same as the normal font.
Dependencies
The default font angle depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Font name, specified as a string or character vector containing the name
of a system-supported font name. The default font depends on the specific
operating system and locale. To view a list of available system fonts, use
listfonts
.
Text color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
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.
Y-axis label text and style, specified as an AxesLabel
object with
these properties.
Text value, specified as a two-element string array or cell array of character vectors and stored as a string array. The first element is the label for the magnitude plot and the second element is the label for the phase plot.
To specify either a magnitude or phase label with multiple lines, concatenate
the lines into a single string using newline
.
myplot.YLabel.String(1) = "first line" + newline + "second line";
Font size in point units, specified as positive scalar. One point equals
1/72
inch.
Dependencies
The default font size depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character thickness, specified as "bold"
or
"normal"
.
Not all fonts have a bold weight. Therefore, the bold font might look the same as the normal font.
Dependencies
The default font weight depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Character slant, specified as "normal"
or
"italic"
.
Not all fonts have an italic font styles. Therefore, the italic font might look the same as the normal font.
Dependencies
The default font angle depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Font name, specified as a string or character vector containing the name of a
system-supported font name. The default font depends on the specific operating
system and locale. To view a list of available system fonts, use
listfonts
.
Text color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
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.
Axis Limits
X-axis limits, specified as a two-element vector of the form
[min,max]
or a cell array of such vectors, where
min
is the minimum axis limit and max
is the
maximum axis limit.
Dependencies
When an entry in the
XLimitsMode
property is"auto"
, the corresponding X-axis limits are configured automatically based on the system dynamics.XLimits
contains limits only for visible inputs. When an entry inInputVisible
isoff
, then the corresponding limits are removed fromXLimits
.
X-axis limit selection mode, specified as one of these strings or a cell array of such strings.
"auto"
— Enable automatic limit selection, which is based on the total span of the plotted data."manual"
— Manually specify the axis limits by setting theXLimits
property.
Dependencies
If you modify an entry in the
XLimits
property, the correspondingXLimitsMode
value changes to"manual"
.XLimitsMode
contains selection modes only for visible inputs. When an entry inInputVisible
isoff
, then the corresponding selection modes are removed fromXLimitsMode
.
Y-axis limits, specified as a two-element vector of the form
[min,max]
or a cell array of such vectors, where
min
is the minimum axis limit and max
is the
maximum axis limit.
Dependencies
When an entry in the
YLimits
property is"auto"
, the corresponding Y-axis limits are configured automatically based on the system dynamics.YLimits
contains limits only for visible axes. When an entry inOutputVisible
isoff
, or ifMagnitudeVisible
orPhaseVisible
isoff
, then the corresponding limits are removed fromYLimits
.
Y-axis limit selection mode, specified as one of these strings or a cell array of such strings:
"auto"
— Enable automatic limit selection, which is based on the total span of the plotted data."manual"
— Manually specify the axis limits by setting theYLimits
property.
Dependencies
If you modify an entry in the
YLimits
property, the correspondingYLimitsMode
value changes to"manual"
.YLimitsMode
contains selection modes only for visible axes. When an entry inOutputVisible
isoff
, or ifMagnitudeVisible
orPhaseVisible
isoff
, then the corresponding selection modes are removed fromYLimitsMode
.
Axes Style
Axes style, specified as an AxesStyle
object with these properties.
Axes background color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
Option to display axes outline, specified as one of these logical on/off values.
"on"
,1
, ortrue
— Display outline."off"
,0
, orfalse
— Hide outline.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Line width of axes outline and tick marks, specified as a positive scalar value in point units.
Ruler color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet. The ruler color affects axes lines, tick marks, and tick labels.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
Font size for tick labels in point units, specified as positive scalar. One point equals 1/72
inch.
Character thickness for tick labels, specified as "bold"
or "normal"
.
Not all fonts have a bold weight. Therefore, the bold font might look the same as the normal font.
Character slant for tick labels, specified as "normal"
or "italic"
.
Not all fonts have an italic font styles. Therefore, the italic font might look the same as the normal font.
Font name for tick labels, specified as a string or character vector containing the name of a system-supported font name. The default font depends on the specific operating system and locale. To view a list of available system fonts, use listfonts
.
Option to display major grid lines, specified as one of these logical on/off values.
"on"
,1
, ortrue
— Display major grid lines."off"
,0
, orfalse
— Hide major grid lines.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Dependencies
The default grid visibility depends on the toolbox preferences. For more information, see Specify Toolbox Preferences for Linear Analysis Plots.
Grid color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
Width of major grid lines, specified as a positive scalar in point units.
Grid line style, specified as one of these values.
Line Style | Description |
---|---|
"-" | Solid line |
"--" | Dashed line |
":" | Dotted line |
"-." | Dash-dotted line |
Grid line transparency, specified as a scalar value in the range [0,1], where a smaller value indicates more transparency.
Option to display minor grid lines, specified as one of these logical on/off values.
"on"
,1
, ortrue
— Display minor grid lines."off"
,0
, orfalse
— Hide minor grid lines.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Dependencies
Minor grid lines are not displayed by default.
Minor grid color, specified as an RGB triplet or a hexadecimal color code and stored as an RGB triplet.
Alternatively, you can specify some common colors by name. This table lists these colors and their corresponding RGB triplets and hexadecimal color codes.
Color Name | RGB Triplet | Hexadecimal Color Code |
---|---|---|
| [1 0 0] | #FF0000 |
| [0 1 0] | #00FF00 |
| [0 0 1] | #0000FF |
| [0 1 1] | #00FFFF |
| [1 0 1] | #FF00FF |
| [1 1 0] | #FFFF00 |
| [0 0 0] | #000000 |
| [1 1 1] | #FFFFFF |
Width of minor grid lines, specified as a positive scalar in point units.
Minor grid line style, specified as one of these values.
Line Style | Description |
---|---|
"-" | Solid line |
"--" | Dashed line |
":" | Dotted line |
"-." | Dash-dotted line |
Minor grid line transparency, specified as a scalar value in the range [0,1], where a smaller value indicates more transparency.
Since R2025a
Active data axes for hold
workflows on MIMO linear analysis plots
or a SISO Bode plots, specified as a two-element vector of integers indicating the row
and column of the active axes. When you first create a chart, the bottom right axes is
active. If you reduce the number of visible axes, the active axes automatically updates
to a visible axes if necessary.
The DataAxes
property affects only hold
workflows that do not include adding new responses.
Legend
Legend axes selection mode, specified as one of these values:
"auto"
— Show the legend in the northeast visible axes."manual"
— Show the legend in the axes indicated by theLegendAxes
property.
Legend axes, specified as a two-element vector of integers indicating the row and column of the axes in which to display the legend.
Dependencies
When LegendAxesMode
is "auto"
, LegendAxes
contains the row and column of the northeast visible axis.
Option to display the legend, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Display the legend."off"
,0
, orfalse
— Hide the legend.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Legend location within the axes, specified as one of these values:
"northeast"
— Top-right corner"northwest"
— Top-left corner"southeast"
— Bottom-left corner"southwest"
— Bottom-right corner"north"
— Top"south"
— Bottom"east"
— Right side"west"
— Left side"best"
— Location where the least conflict occurs with the plot data at the time that you create the legend. If the plot data changes, you might need to reset the location to"best"
.
Orientation for stacking legend items, specified as one of these values:
"vertical"
— Stack items vertically."horizontal"
— Stack items horizontally.
Chart Layout
Parent container of the chart, specified as one of these objects:
Figure
TiledChartLayout
UIFigure
UIGridLayout
UIPanel
UITab
Chart visibility, specified as one of these logical on/off values:
"on"
,1
, ortrue
— Display the chart."off"
,0
, orfalse
— Hide the chart without deleting it. You can still access the properties of chart when it is not visible.
The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Visibility of the chart object handle in the list of children for its parent, specified as one of these values:
'on'
— Chart object handle is always visible.'off'
— Chart object handle is invisible at all times. This option is useful for preventing unintended changes to the chart by another function. To temporarily hide the handle during the execution of that function, set theHandleVisibility
to'off'
.'callback'
— Chart 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 in the Command Window, but it allows callback functions to access it.
Position units, specified as a value from the following table. To change the position of the chart in specific units, set the Units
property before specifying the Position
property. If you specify the Units
and Position
properties in a single command (using name-value pairs), be sure to specify Units
before Position
.
Units | Description |
---|---|
'normalized' | Normalized with respect to the parent container, which is typically the figure, panel, or tab. 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 font of the graphics root object:
|
'points' | Typography points. One point equals 1/72 inch. |
'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. |
Chart size and location, including the margins for decorations such as axis labels and tick marks. Specify this property as a vector of form [left bottom width height]
. The values are in the units specified by the Units
property.
left
— Distance from the left edge of the parent container to the outer-left edge of the chart that includes the margins. Typically, the parent container is a figure, panel, or tab.bottom
— Distance from the bottom edge of the parent container to the outer-bottom edge of the chart that includes the margins.width
— Width of chart, including the margins.height
— Height of chart, including the margins.
Note
Setting this property has no effect when the parent of the chart is a TiledChartLayout
.
Chart size and location, excluding the margins for decorations such as axis labels and tick marks. Specify this property as a vector of form [left bottom width height]
. The values are in the units specified by the Units
property.
left
— Distance from the left edge of the parent container to the inner-left edge of the chart that excludes the margins. Typically, the parent container is a figure, panel, or tab.bottom
— Distance from the bottom edge of the parent container to the inner-bottom edge of the chart that excludes the margins.width
— Width of the chart, excluding the margins.height
— Height of the chart, excluding the margins.
Note
Setting this property has no effect when the parent of the chart is a TiledChartLayout
.
Chart size and location, excluding the margins for decorations such as axis labels and tick marks. Specify this property as a vector of form [left bottom width height]
. This property is equivalent to the InnerPosition
property.
Note
Setting this property has no effect when the parent of the chart is a TiledChartLayout
.
Position property to hold constant when adding, removing, or changing decorations, specified as one of these values:
'outerposition'
— TheOuterPosition
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 theInnerPosition
property.'innerposition'
— TheInnerPosition
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 theOuterPosition
property.
Note
Setting this property has no effect when the parent of the chart is a TiledChartLayout
.
Layout options, specified as a TiledChartLayoutOptions
object or GridLayoutOptions
object. This property specifies options when an instance of your chart is a child of a tiled chart layout or gridded layout. If the instance is not a child of one of these layouts (for example, it is a child of a figure or panel), then this property is empty and has no effect. Otherwise, you can position the chart within the layout by configuring the layout options.
This code places chart object c
into the third tile of a tiled chart layout and makes the chart span 2 rows and 3 columns.
c.Layout.Tile = 3; c.Layout.TileSpan = [2 3];
This code places chart object c
into row 2
of a gridded layout and makes the chart span columns 3
and 4
.
c.Layout.Row = 2; c.Layout.Column = [3 4];
Properties to reset when adding a new plot to the chart, specified as one of these values:
'add'
— Add new plots to the existing chart. Do not delete existing plots or reset axes properties before displaying the new plot.'replace'
— Delete existing plots and reset chart properties, exceptPosition
andUnits
, to their default values before displaying the new plot.
Tips
You can also interactively modify response plot properties using the:
Property Editor — For more information, see Customize Linear Analysis Plots Using Property Editor.
Version History
Introduced in R2024bWhen using hold-on workflows, you can now programmatically specify the active data axes
for a chart. To specify the active data axes, set the DataAxes
property
of the corresponding chart object.
You can now specify these style properties for chart objects:
Background color — Use the
AxesStyle.BackgroundColor
property.Box outline width — Use the
AxesStyle.BoxLineWidth
property.
You can now customize grid line appearance for using new style properties. To specify a
style property, set the corresponding AxesStyle
subproperty of the
chart object. This table lists the new style properties and their subproperties and
supported plots.
Style Property | AxesStyle Subproperty |
---|---|
Major grid line style | GridLineStyle |
Major grid transparency | GridAlpha |
Minor grid visibility | MinorGridVisible |
Minor grid color | MinorGridColor |
Minor grid line width | MinorGridLineWidth |
Minor grid line style | MinorGridLineStyle |
Minor grid transparency | MinorGridAlpha |
MATLAB Command
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)