| 1 |
|
| 2 |
// build legend (but don't display it yet).. |
| 3 |
#set ncutoffs = $count( "*", @cutofflist ) |
| 4 |
#set i = 1 |
| 5 |
#for h in @cutofflist |
| 6 |
|
| 7 |
#set color = $nmember( @i, @colorlist ) |
| 8 |
#proc legendentry |
| 9 |
#if @symbol != "" |
| 10 |
sampletype: symbol |
| 11 |
details: style=filled @symbol fillcolor=@color |
| 12 |
#else |
| 13 |
sampletype: color |
| 14 |
details: @color |
| 15 |
#endif |
| 16 |
tag: @h |
| 17 |
#if @i = 1 |
| 18 |
label: @h + |
| 19 |
#else |
| 20 |
#set next = $arith( @i-1 ) |
| 21 |
#set next = $nmember( @next, @cutofflist ) |
| 22 |
#if @next !like *.* |
| 23 |
// only do this when not working with decimal cutoffs.. scg 3/6/06 |
| 24 |
#set next = $arith( @next-1 ) |
| 25 |
#endif |
| 26 |
#if @next = @h |
| 27 |
label: @h |
| 28 |
#else |
| 29 |
label: @h - @next |
| 30 |
#endif |
| 31 |
#endif |
| 32 |
|
| 33 |
#set i = $arith( @i+1 ) |
| 34 |
|
| 35 |
#endloop |
| 36 |
|
| 37 |
// use proc scatterplot to count # of instances and pick appropriate color from legend.. |
| 38 |
#proc scatterplot |
| 39 |
xfield: @x |
| 40 |
yfield: @y |
| 41 |
cluster: yes |
| 42 |
#if @contentfield != "" |
| 43 |
symrangefield: @contentfield |
| 44 |
#else |
| 45 |
dupsleg: yes |
| 46 |
#endif |
| 47 |
#if @symbol != "" |
| 48 |
symbol: @symbol |
| 49 |
#elseif @outline != "" |
| 50 |
rectangle: @xbinsize @ybinsize outline |
| 51 |
#if @outline != yes |
| 52 |
linedetails: @outline |
| 53 |
#endif |
| 54 |
#else |
| 55 |
rectangle: @xbinsize @ybinsize @outline |
| 56 |
#endif |
| 57 |
#endproc |
| 58 |
|