// $Id: snsgr.hoc,v 1.15 1995/11/20 02:25:02 billl Exp $ //* GRAPHICAL DISPLAY OF CONNECTIVITY objref snsgrlist // a list of connectivity graphs snsgrlist = new List() objectvar ind, vec ind = new Vector(100) vec = new Vector(100) symnum = 7 colnum = 8 objectvar cl[colnum], sym[symnum] // only 9 different symbols available for tempvar=0,symnum-1 { sym[tempvar]=new String() } for tempvar=0,colnum-1 { cl[tempvar]=new String()} { cl[0].s ="black" cl[1].s ="red" cl[2].s ="blue" cl[3].s ="green" cl[4].s ="orange" cl[5].s ="brown" cl[6].s ="violet" cl[7].s ="yellow" } { sym[0].s = "o" sym[1].s = "t" sym[2].s = "s" sym[3].s = "O" sym[4].s = "T" sym[5].s = "S" sym[6].s = "+"} offnum = 6 offint = 0.15 //** verge(LIST) shows divergence or convergence for syn mechs in LIST proc verge () { local i,cnt,dotsize if (numarg()>1) { dotsize = $2 } else { dotsize = 2 } cnt = $o1.count() vec.resize(cnt) for (i=0;i 0) { sprint(temp_string_,"/%d/",$1) sfunc.tail(mechnames,temp_string_,temp_string_) sfunc.head(temp_string_,"/",temp_string_) print temp_string_ } else if($15) { dotsize = $6 } else { dotsize = 2 } if (numarg()>6) { abc = $7 } else {abc = 0} if (numarg()>7) { offint = $8 } else {offint = 0.15} inc = xnum = ynum = ymin = 0 if ((cdx = connmat_findstr($s2)) == -1) { print "unknown x string" return } if ((cdy = connmat_findstr($s4)) == -1) { print "unknown y string" return } graphItem = new Graph() if (numarg()>8) { graphItem.label($s9) } graphItem.save_name("snsgrlist.") sprint(temp_string_,"%s %s%d %s%d",$o1,$s2,$3,$s4,$5) graphItem.label(temp_string_) snsgrlist.append(graphItem) print "chose/total" for i=0,$o1.count-1 { nsyn = $o1.object(i).nsyn ind.resize(nsyn) ind.fill(-1) vec.resize(nsyn) vec.fill(-1) k = 0 for j=0,nsyn-1 { if (cmcb($o1.object(i),j)==1) { k = k + 1 cdd = connmat_newpt($o1.object(i),cdx,$3,j,i) + offint*int(inc/offnum) cde = connmat_newpt($o1.object(i),cdy,$5,j,i) + offint*(inc%offnum) if (cdd < 0 || cde < 0) { continue } if (cdd > xnum) xnum = cdd if (cde > ynum) ynum = cde if (cde < ymin) ymin = cde ind.set(j,cdd) vec.set(j,cde) // put in the duplicates so fill vector (else stray 0s) } } printf("%d: %d/%d ",i,k,nsyn) if (abc) { color = i%8 + 1 // only 8 useable colors; 0 is white vec.mark(graphItem,ind,sym[i%symnum].s,dotsize,color,3) } else { vec.mark(graphItem,ind,"o",dotsize) } inc = inc + 1 } printf("\n") for (ii=1;ii