# xlimit

Version:

Sets or returns the range of the x-scale.

Note

You can only use the xlimit function in the MathScript Console.

## Syntax

xlimit ('auto')
xlimit ('manual')
xlimit(minx, maxx)
xlimit
a = xlimit
b = xlimit('mode')
Legacy name: xlim

## 'auto'

Directs MathScript to fit the x-scale automatically to the plot.

## 'manual'

Directs MathScript not to fit the x-scale automatically to the plot.

## minx

Minimum x-value. minx is a real scalar.

## maxx

Maximum x-value. maxx is a real scalar.

## 'mode'

Mode that MathScript uses to determine the range of the scale.

## a

Array of two elements which include minimum and maximum values of the scale.

## b

Mode that MathScript uses to determine the range of the scale. b is a string that can be either 'auto' or 'manual'.

## Syntax Variants

• xlimit ('auto') directs MathScript to fit the x-scale automatically to the plot.
• xlimit ('manual') directs MathScript not to fit the x-scale automatically to the plot.
• xlimit ('mode') returns the mode which MathScript uses to determine the range of the x-scale.
• xlimit returns the minimum and maximum values of the x scale.
• xlimit(minx, maxx) sets the minimum and maximum values of the x scale.
X = 0:1:10;
plot(X)
xlimit([2, 8])
a = xlimit('mode')

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices