メインコンテンツ

mlreportgen.chart.DataSet Class

Namespace: mlreportgen.chart

Chart data set

Since R2026b

Description

Use an object of the mlreportgen.chart.DataSet class to define a chart data set. A data set consists of one or more series of data points where each point in a series corresponds to a predefined data category. The data set also specifies names for the categories.

The mlreportgen.chart.DataSet class is a handle class.

Class Attributes

HandleCompatible
true
ConstructOnLoad
true

For information on class attributes, see Class Attributes.

Creation

Description

dataSetObj = mlreportgen.chart.DataSet creates an empty data set.

dataSetObj = mlreportgen.chart.DataSet(seriesNames, categoryNames, points) creates a data set from arrays that specify series names, category names, and data points of the set.

dataSetObj = mlreportgen.chart.DataSet(dataSeries, categoryNames, points) creates a set from a vector of mlreportgen.chart.DataSeries objects and a vector of category names.

dataSetObj = mlreportgen.chart.DataSet(table) creates a data set from a MATLAB table that specifies the data points, series names, and category names of the set.

Input Arguments

expand all

Data series names, specified as string array.

Set category names, specified as a string array.

This argument sets the Categories property.

Data series in the data set, specified as a vector of mlreportgen.chart.DataSeries objects.

This argument sets the SeriesSet property.

Chart data points, specified as one of the following:

  • a numerical array of data point values.

  • a vector of mlreportgen.chart.DataSeries objects.

  • a cell array of cell arrays that specify X and Y values of data points.

Example: [1 2 3 4]

Example: {{1,5}, {2,10}}

Chart data, specified as a MATLAB table. The table data specifies the data points; the table column names specify the series names; and the table row names specify the category names.

Properties

expand all

Data series belonging to the data set, specified as a vector of mlreportgen.chart.DataSeries objects. Each series must contain the same number of data points.

Attributes:

GetAccess
public
SetAccess
public
Transient
true
NonCopyable
true

Data set category names, specified as a cell array of string scalars. The array must contain a name for each data category represented by the data points of the data set.

Example: ["Liquid","Solid","Gas"]

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: cell

Number of series contained by the data set, specified by an integer equal to or greater than zero.

Attributes:

GetAccess
public
SetAccess
none
Transient
true
NonCopyable
true

Data Types: uint64

Methods

expand all

Version History

Introduced in R2026b