Annotation of researchv10dc/vol2/grap/scatvec.awk, revision 1.1.1.1

1.1       root        1: awk '
                      2: # Parse all commands
                      3: $1 == "file"   { fname = $2 }
                      4: $1 == "log"    { logtext = $0 }
                      5: $1 == "symbol" { symtext = $2 }
                      6: $1 == "y"      { yfield = $2; ylabel = $3 }
                      7: $1 == "x"      { n++; xfield[n] = $2; xlabel[n] = $3 }
                      8: # Generate n graphs
                      9: END {  print ".G1"
                     10:        for (i = 1; i <= n; i++) {
                     11:                if (s != "") print "#"
                     12:                print "graph A" s
                     13:                s = " with .Frame.w at A.Frame.e +(.1,0)"
                     14:                print "frame ht " 5/n " wid " 5/n
                     15:                print "label bot \"" xlabel[i] "\""
                     16:                if (i == 1) print "label left \"" ylabel "\""
                     17:                if (logtext != "") print "coord " logtext
                     18:                print "ticks off"
                     19:                print "copy " fname " thru { " symtext\
                     20:                        " at " xfield[i] "," yfield " }"
                     21:        }
                     22:        print ".G2"
                     23: }
                     24: ' $1

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.