Re: [cricket-users] Graphing to 100%

From: Jeff Allen (jra@corp.webtv.net)
Date: Mon Jul 19 1999 - 18:34:59 PDT


Matthew Stier wrote:
> Re-read the documentation. (The Cricket Reference Guide).
>
> The tags 'y-min' and 'y-max' are generic tags, and are only valid in the
> --default-- dictionary.

Actually, that's not true anymore in Cricket 0.69. Alas, that means
he's reporting a bug, since he's using it right.

I just loked at it and realized I had added a check that's breaking
it. Try applying the patch below. It replaces the logic with clearer
logic that does the right thing, along with cleaning up some other
cruft related to this feature.

Sorry for the problem. A new future new version of Cricket will have
this patch in it.

-- 
Jeff R. Allen              |  jra@corp.webtv.net
WebTV Service Engineering  |  http://www.munitions.com/~jra

==== //depot/operations/nsgtools/cricket/grapher.cgi#19 - /home/jra/operations/nsgtools/cricket/grapher.cgi ==== *** /tmp/tmp.13846.0 Mon Jul 19 18:32:14 1999 --- /home/jra/operations/nsgtools/cricket/grapher.cgi Mon Jul 19 18:31:51 1999 *************** *** 66,72 **** # This is for debugging here at WebTV. Feel free to nuke this # if you happen to _also_ be running Cricket on a machine named # mango. :) ! if ($ENV{'HTTP_HOST'} =~ /mango1/) { $log = 'debug'; } Common::Log::setLevel($log); --- 66,72 ---- # This is for debugging here at WebTV. Feel free to nuke this # if you happen to _also_ be running Cricket on a machine named # mango. :) ! if ($ENV{'HTTP_HOST'} =~ /mango/) { $log = 'debug'; } Common::Log::setLevel($log); *************** *** 1199,1212 **** $yminlck = 0; } - my(@rigid); - - if (defined($ymin) || defined($ymax)) { - push @rigid, '-r'; - push @rigid, '-u', $ymax if (defined($ymax)); - push @rigid, '-l', $ymin if (defined($ymin)); - } - # ok, lets attempt to handle mtargets. We need to loop through # each of the individual targets and construct the graph command # on each of those. The other initializations should be outside --- 1199,1204 ---- *************** *** 1297,1312 **** my($ym); ! $ym = graphParam($gRef, 'y-max', $ymax); ! if (! $ymaxlck && defined($ym) && defined($ymax)) { ! if ($ym > $ymax) { $ymax = $ym; } } ! $ym = graphParam($gRef, 'y-min', $ymin); ! if (! $yminlck && defined($ym) && defined($ymin)) { ! if ($ym < $ymin) { $ymin = $ym; } } --- 1289,1308 ---- my($ym); ! $ym = graphParam($gRef, 'y-max'); ! if ($ym && ! $ymaxlck) { ! if (defined($ymax) && $ymax > $ym) { ! # nothing ! } else { $ymax = $ym; } } ! $ym = graphParam($gRef, 'y-min'); ! if ($ym && ! $yminlck) { ! if (defined($ymin) && $ymin > $ym) { ! # nothing ! } else { $ymin = $ym; } } *************** *** 1487,1492 **** --- 1483,1490 ---- push @rules, 'COMMENT:\s'; } + my(@rigid); + if (defined($ymin) || defined($ymax)) { push @rigid, '-r'; push @rigid, '-u', $ymax if (defined($ymax));



This archive was generated by hypermail 2b29 : Mon Mar 06 2000 - 19:00:57 PST