DADiSP Worksheet Functions > Function Categories > Display and Manipulation > SETPLOTSTYLE

 

SETPLOTSTYLE

Purpose:

Sets the plot style for a Window or series.

Syntax:

SETPLOTSTYLE(series, pstyle, item)

series

-

Optional. A series. Defaults to the current Window.

pstyle

-

An integer, the series plot style:

0:

Lines (default)

1:

Points

2:

Sticks

3:

Bars

4:

Table

5:

HiLo

6:

Reserved

7:

Stack

8:

Percent stack

9:

Steps

10:

Stem

item

-

Optional. An integer, the target series item. Defaults to 1, the primary item.

Example:

setplotstyle(W3, 2)

 

sets the graph style in Window 3 to sticks.

Example:

a = gnorm(100,1);setplotstyle(a, 9)

 

Sets the style of a to steps. If a is placed in an empty window, it will automatically be displayed as a step plot.

Example:

W1: integ(gnorm(10, 1))

W2: resample(W1, 10, "spline");overp(W1, lred);setplotstyle(10, 2)

 

 

W1 contains a 10 point series. W2 resamples the series using spline interpolation and overplots the original in red. The overplotted series is set to a stem plot to depict the smoothing nature of the interpolation.

Remarks:

If the plot style of a Window has not been set, the series will be displayed in the style of the series. If the window style has been set, the series will be displayed in the style of the Window. For example:

 

W1: 1..100;bars

a = gnorm(100,1);setplotstyle(a, 10)

W1: a

W2: a

 

The plotting style of W1 is set to bars and all series placed in W1 will be displayed as bars. The variable a plots as bars in W1 even though the style was set to stem. However, because the plot style of W2 was not previously set, the series is displayed as a stem plot.

 

Use CLEAR to remove the Window plotting style.

 

clear(w1)

W1: a

 

The series is now displayed as a stem plot.

 

See INHSERSTYLE and INHWINSTYLE to control plot style inheritance.

 

See SETPLOTTYPE to set the plotting style for mult-column series or arrays.

See Also:

BARS

GETPLOTSTYLE

GETPLOTTYPE

HILO

INHSERSTYLE

INHWINSTYLE

LINES

POINTS

SETPLOTTYPE

SETSYMBOL

STACK

STEM

STEPS

STICKS

TABLEVIEW