[Bio] / FigWebServices / subsys.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/subsys.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.57, Thu Mar 10 23:13:37 2005 UTC revision 1.58, Fri Mar 11 04:11:30 2005 UTC
# Line 1372  Line 1372 
1372                    my $colval; # what we are basing the color on.                    my $colval; # what we are basing the color on.
1373                    if ($valuetype->[0] eq "string") {$colval=$value} # strings are easy, we color based on string;                    if ($valuetype->[0] eq "string") {$colval=$value} # strings are easy, we color based on string;
1374                    else {                    else {
1375                      # at the moment we will spllit numbers into groups of 10.                      # Initially spllit numbers into groups of 10.
1376                      # $valuetype->[2] is the maximum number for this value                      # $valuetype->[2] is the maximum number for this value
1377                      $colval = int($valuetype/$valuetype->[2]*10);                      # but I don't like this
1378                        # $colval = int($value/$valuetype->[2]*10);
1379    
1380                        # we want something like 0-1, 1-2, 2-3, 3-4 as the labels.
1381                        # so we will do it in groups of ten
1382                        my ($type, $min, $max)=@$valuetype;
1383                        for (my $i=$min; $i<$max; $i+=$max/10) {
1384                         if ($value >= $i && $value < $i+$max/10) {$colval = $i . "-" . ($i+($max/10))}
1385                        }
1386                    }                    }
1387    
1388                      unless ($colval) {print STDERR "No color  value found for |$value|\n"}
1389    
1390                    if (!$tagvalcolor->{$colval}) {                    if (!$tagvalcolor->{$colval}) {
1391                      # figure out the highest number used in the array                      # figure out the highest number used in the array
# Line 2820  Line 2829 
2829   my ($tvc)=@_;   my ($tvc)=@_;
2830   my $tab = [];   my $tab = [];
2831   my @colors=&cool_colors();   my @colors=&cool_colors();
2832   my @labels=sort keys %$tvc;   my @labels=sort {$a cmp $b} keys %$tvc;
2833   my $row;   my $row;
2834   for (my $i=0; $i<= scalar @labels; $i++) {   for (my $i=0; $i<= scalar @labels; $i++) {
2835    next unless (defined $labels[$i]);    next unless (defined $labels[$i]);

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3