Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Plot Manipulation
See also: show adddata

Function: getdata
Description: getdata gets a data from a plot.


The data set must be previous shown in this plot using show oder adddata.


Usage: data=getdata(di, row_num, col_num, data_num)
Input:
di Display
row_num integer, 1, ..., count of lines of di
col_num integer, 1, ..., count of columns of di
data_num integer, 1, ..., count of data sets plotted in this plot
Output:
data a complex object that includes following components:
a matrix of the points
pcolor a (nx3) matrix of color
pstyle (nx1), style
psize (nx1), size.

Example:



x=(1:10)

x=x~(sin(x/5))

setmaskp(x, 4, 5, 8)

d=createdisplay(1, 1)

show(d, 1, 1, x)

x=1

x=getdata(d, 1, 1, 1)

x 

Result:



//getdata restores the data from the plot and puts it in x.

Contents of x.data

[ 1,]        1  0.19867 

[ 2,]        2  0.38942 

[ 3,]        3  0.56464 

[ 4,]        4  0.71736 

[ 5,]        5  0.84147 

[ 6,]        6  0.93204 

[ 7,]        7  0.98545 

[ 8,]        8  0.99957 

[ 9,]        9  0.97385 

[10,]       10   0.9093 

Contents of x.pcolor

[ 1,]      255        0        0 

[ 2,]      255        0        0 

[ 3,]      255        0        0 

[ 4,]      255        0        0 

[ 5,]      255        0        0 

[ 6,]      255        0        0 

[ 7,]      255        0        0 

[ 8,]      255        0        0 

[ 9,]      255        0        0 

[10,]      255        0        0 

Contents of x.pstyle

[ 1,]        5 

[ 2,]        5 

[ 3,]        5 

[ 4,]        5 

[ 5,]        5 

[ 6,]        5 

[ 7,]        5 

[ 8,]        5 

[ 9,]        5 

[10,]        5 

Contents of x.psize

[ 1,]        8 

[ 2,]        8 

[ 3,]        8 

[ 4,]        8 

[ 5,]        8 

[ 6,]        8 

[ 7,]        8 

[ 8,]        8 

[ 9,]        8 

[10,]        8 


Group: Plot Manipulation
See also: show adddata

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

(C) MD*TECH Method and Data Technologies, 21.9.2000