trendChart
Description
Use the trendChart
to plot a trend analysis chart with specified
x- and y-axes from an adeDataReader
object.
Creation
Description
Input Arguments
obj
— Object containing trend chart data
adeDataReader
object
Object containing the trend chart data, specified as an
adeDataReader
object.
Data Types: char
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: fig = trendChart(obj,Yaxis='Iload')
plots the
Iload
on the y-axis of a trend chart from the
adeDataReader
object and returns the object handle
fig
.
Xaxis
— Fields to be plotted on x-axis of trend chart
cell array of strings
Fields to be plotted on the x-axis of the trend chart, specified as a cell array of strings.
Data Types: char
Yaxis
— Field to be plotted on y-axis of trend chart
string
Field to be plotted on the y-axis of the trend chart, specified as a string.
Note
You must provide the Yaxis
argument.
Data Types: char
Legend
— Legends for trend chart
cell array of strings
Legends for trend chart, specified as a cell array of strings.
Data Types: char
FigAxes
— Handle of figure axes
object handle
Handle of figure axes of the trend chart, specified as object handle.
Data Types: char
Output Arguments
Tchart
— Trend chart object
object
Trend chart object containing the axes information, legends, and trend chart plot.
Data Types: char
Examples
Plot Trend Chart from Command Prompt
Unzip the ldo_test_Interactive.244.zip
file. Load the ldo_test_Interactive.244.mat
file containing the adeInfo
object data.
unzip('ldo_test_Interactive.244.zip'); data = adeDataReader('ldo_test_Interactive.244.mat');
Find the variables for trend chart analysis.
fields = data.TrendChartFields;
Plot trend chart of Phase Margin
against cfb
, Iload
, and temperature
.
fig = trendChart(data,Yaxis='Phase Margin',Xaxis={fields{2},fields{1},fields{4}})
fig = trendChart with properties: InputFile: [1×1 adeDataReader] Xaxis: {'cfb' 'Iload' 'temperature'} Yaxis: {'Phase Margin'} Legend: {} FigAxes: [1×1 Axes]
Update the plot to observe the trend of gain margin instead of phase margin against the same variables.
fig.Yaxis = "Gain Margin"
fig = trendChart with properties: InputFile: [1×1 adeDataReader] Xaxis: {'cfb' 'Iload' 'temperature'} Yaxis: {'Gain Margin'} Legend: {} FigAxes: [1×1 Axes]
Use the corModelSpec
as a legend and update the plot.
fig.Legend = fields{3}
fig = trendChart with properties: InputFile: [1×1 adeDataReader] Xaxis: {'cfb' 'Iload' 'temperature'} Yaxis: {'Gain Margin'} Legend: {'corModelSpec'} FigAxes: [1×1 Axes]
If you accidentally close the plot window, you can bring it back.
fig.show
Version History
Introduced in R2024b
See Also
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: .
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)