STATISTICA







STATISTICA BASIC Program Arrows.stb

{ This program generates colorful arrows on the top of the existing graph, c:\stat\arrows.stg. The data file c:\stat\arrows2.sta should be open before running the program. These files are available for downloading in arrows.zip.

Program written, modified, or edited at StatSoft, Inc.}


const xsize=16, ysize=14;
dim col(10);

col(1):=ColorRGB(64,0,128);
col(2):=BLUE;
col(3):=ColorRGB(0,128,0);
col(4):=GREEN;
col(5):=ColorRGB(128,128,0);
col(6):=COlorRGB(255,128,0);
col(7):=RED;
col(8):=ColorRGB(128,0,0);


graph:=OpenGraph('c:\stat\arrows.stg');
for i:=1 to xsize do
  for j:=1 to ysize do
  begin
    if Valid (data (j,i) ) then
    begin
      x1:=(i)*(100/xsize)-1;
      y1:=(ysize-j)*(100/ysize)+1;
      x2:=(i-1)*(100/xsize)+1;
      y2:=(ysize-j+1)*(100/ysize)-1;
      x1:=x1-data(j,i);
      x2:=x2+data(j,i);
      arr:=GraphDrawArrow (graph, HEAD_FANCY_FILLED, 3, ?Angle,
					?Style, x1, y1, x2, y2,0);
      GraphSetObjectLineStyle (Graph, arr, ON, ?Pattern, ?Size,
						col(data(j+ysize+1,i)));
      GraphSetObjectAreaStyle (Graph, arr, ON, ?Pattern,
						col(data(j+ysize+1,i)));
    end;
  end;
Back to List of Programs



[StatSoft]
2300 East 14th Street, Tulsa, OK 74104
Phone: (918) 749-1119; Fax: (918) 749-2217

[StatSoft]e-mail: info@statsoft.com

©Copyright StatSoft, Inc., 1984-2004.
StatSoft, StatSoft logo, STATISTICA, SEWSS, SEDAS, Data Miner, SEPATH and GTrees are trademarks of StatSoft, Inc.