[rrd-developers] Re: Strange Y labels in 1.2.9 with --alt-autoscale

Kai Risku Kai.Risku at arrak.fi
Fri Jun 17 09:19:58 MEST 2005


> > graph_label = '68.0 G' for 67.9865
> > graph_label = '68.2 G' for 68.1728
> > graph_label = '68.4 G' for 68.3591
> > graph_label = '68.5 G' for 68.5453
> > graph_label = '68.7 G' for 68.7316
> 
> :-) so how about this:
> 
> Index: rrd_graph.c
> ===================================================================
> --- rrd_graph.c (revision 639)
> +++ rrd_graph.c (working copy)
> @@ -1547,7 +1547,7 @@
>             if(decimals <= 0) /* everything is small. make place for
zero
> */
>                 decimals = 1;
> 
> -           im->ygrid_scale.gridstep = pow((double)10,
> floor(log10(range)));
> +           im->ygrid_scale.gridstep = pow((double)10,
> floor(log10(range*im->viewfactor/im->magfact)))/im->viewfactor*im-
> >magfact;
> 
>             if(im->ygrid_scale.gridstep == 0) /* range is one -> 0.1
is
> reasonable scale */
>                 im->ygrid_scale.gridstep = 0.1;
> 

Yes, now everything seems to work just perfectly:

graph_label = '65.46 G' for 65.4600
graph_label = '65.48 G' for 65.4800
graph_label = '65.50 G' for 65.5000
graph_label = '65.52 G' for 65.5200
graph_label = '65.54 G' for 65.5400
graph_label = '65.56 G' for 65.5600


Thanks about a megabunch or two for a really nice tool!


--
Kai.Risku at arrak.fi     GSM  +358-40-767 8282
Oy Arrak Software Ab   http://www.arrak.fi

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list