bar (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

Owning Class: plots

Requires: MathScript RT Module

Syntax

bar(y)

bar(y, width)

bar(y, style)

bar(y, color)

bar(x, y)

bar(x, y, width)

bar(x, y, style)

bar(x, y, color)

bar(y, width, style, color)

bar(x, y, width, style, color)

Description

Generates a plot of vertical bars.

Examples

Inputs

Name Description
x Specifies the x-coordinates of the bars you want to plot. x is a vector. length(x) must equal length(y). If you do not specify x, the x-axis scale equals length(y) if y is a vector or size(y, 1) if y is a matrix.
y Specifies the heights of the bars you want to plot. y is a vector or matrix.
width Specifies the width of the bars you want to plot.
style Specifies the plot style. style is a string that accepts the following values.

'group' (default) If y is a matrix, bar plots each row of y as a group of bars. The number of bars in each group equals the number of columns in y.
'stack' If y is a matrix, bar plots each row of y as one stacked bar.
color Specifies a valid color attribute for the plot. color is a string that accepts the following values.

'b' Blue
'c' Cyan
'g' Green
'k' Black
'm' Magenta
'r' Red
'w' White
'y' Yellow

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine No (always ignored)
Supported on RT targets No

Examples

y = rand(10, 2);
bar(y);

Related Topics

area
bar3d
bar3dhoriz
barhoriz

文章是否对您有帮助?

没有帮助