next up previous contents
Next: Setting a structure over Up: Creating and initializing a Previous: Creating a graphic structure

Managing subgraphs

   

tabular2156

If graphics is not based on a data or TS-SOM structure, subgraphs must be created manually. The command addsg creates a subgraph and returns the index of the created subgraph. The command setsg connects data records to subgraphs. The command rmsg removes the given subgraph.

Example (ex7.3): The following commands create two subgraphs and connects them to data records. The data record indexed by 15 is connected to the first subgraph and the data record 45 to the second subgraph.

To illustrate results, two bars are created from the fields of the Boston data. The last command writes a result graph to a file as PostScript.

NDA> load boston.dat
NDA> mkgrp grp1
NDA> addsg grp1
0
NDA> setsg grp1 -inx 0 -rec 15
NDA> addsg grp1
1
NDA> setsg grp1 -inx 1 -rec 300
NDA> bar grp1 -f boston.crim -co red
NDA> bar grp1 -f boston.zn -co green
NDA> wrps -n grp1 -o koe.ps -w 500 -h 500

figure2169



Erkki Hakkinen
Thu Sep 24 11:51:34 EET DST 1998