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

Managing subgraphs

   

addsg Create a new subgraph to a graphic structure
<graphic> name of the graphic structure
setsg Connect a data record to a subgraph
<graphic> name of the graphic structure
-inx <index> index of the subgraph
-rec <recinx> index of the data record
rmsg Remove the specified subgraph
<graphic> name of the graphic structure
-inx <index> index of the subgraph

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

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

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

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

figure3030



Anssi Lensu
Thu May 17 15:00:44 EET DST 2001