Main Content

mlreportgen.chart.PlotArea Class

Namespace: mlreportgen.chart

Define the area containing the chart axis

Since R2026b

Description

Use an object of the mlreportgen.chart.PlotArea class to define the area containing the chart data plot.

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

Class Attributes

HandleCompatible
true
ConstructOnLoad
true

For information on class attributes, see Class Attributes.

Creation

Description

plotAreaObj = mlreportgen.chart.PlotArea(x,y,height,width) creates a plot area that has the specified x-y coordinates, height, and width.

Input Arguments

expand all

X-coordinate of the plot area, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. The value indicates the distance between the left edge of the entire chart area and the left edge of the plot. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Example: "5in" specifies 5 inches

Data Types: char | string

Y-coordinate of the plot area, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. The value indicates the distance between the top edge of the entire chart area and the top edge of the plot. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Example: "5in" specifies 5 inches

Data Types: char | string

Height of the plot area, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Example: "5in" specifies 5 inches

Width of the plot area, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Example: "5in" specifies 5 inches

Properties

expand all

X-coordinate of the plot area, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. The value indicates the distance between the left edge of the entire chart area and the left edge of the plot. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Example: "5in" specifies 5 inches

Data Types: char | string

Y-coordinate of the plot area, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. The value indicates the distance between the top edge of the entire chart area and the top edge of the plot. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Example: "5in" specifies 5 inches

Data Types: char | string

Height of the plot area, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Example: "5in" specifies five inches

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Width of the plot area, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Example: "5in" specifies five inches

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Format of the plot area, specified as an mlreportgen.chart.ShapeFormat object.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Version History

Introduced in R2026b