DADiSP Worksheet Functions > Function Categories > Plot Attributes > SETXAUTO

 

SETXAUTO

Purpose:

Specifies the x-axis Window coordinates for autoscaling.

Syntax:

SETXAUTO(win, xleft, xright, mode)

win

-

Optional. Window reference. Defaults to the current Window.

xleft

-

A real. Left-hand Window boundary.

xright

-

A real. Right-hand Window boundary.

mode

-

Optional, An integer, the target value of xleft and xright.

0:

Use plot coordinates (default).

1:

Use time values.

2:

Use sample indices.

Example:

W1: gnorm(1000,1);setxauto(400, 600)

 

Generates a 1000 point random series. The left-hand side of the Window will be set to 400 and the right side to 600 when the Window is autoscaled. The default autoscale coordinates would have been 0.0 and 999.0.

Example:

W2: gnorm(1000,1);sethunits("Time");settime("12:00");setxauto(todstr("12:05"), todstr("12:08"), 1)

 

Generates a 1000 point random series. The left-hand side of the Window will be set to 12:05 and the right side to 12:08 when the Window is autoscaled. The window displays 2 seconds of data in clock time.

Example:

W3: gnorm(1000,1/1000);setxauto(400, 600, 2)

 

Generates a 1000 point random series. The left-hand side of the Window will be set to point number 400 at 0.4 and the right side to point number 600 at 0.6 when the Window is autoscaled. The window displays 201 samples (600 - 400 + 1).

Remarks:

A Window can be autoscaled with the AUTOSCALE function, by pressing Ctrl+Home when the Window is activated, by pressing the Autoscale button or selecting Autoscale from the right click popup menu.

 

Use setxauto(-1, -1) to set automatic x-axis autoscaling. CLEAR also resets autoscaling to automatic.

 

See SETXRANGE to set the autoscale range and number of tics to force labels on the first and last tics.

See Also:

AUTOSCALE

CLEAR

GETXL

GETXR

GETYT

GETYB

SETX

SETXRANGE

SETXY

SETY

SETYAUTO

SETZAUTO

WINFLIPX