From: Tobias Oetiker Date: Thu, 16 Jun 2005 22:09:36 +0000 (+0000) Subject: when building the sgridstep in alt-y-grid mode, take the --base into consideration. X-Git-Tag: 1.2.10~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce585127a3555585382f73405bc2cdc4f081796f;p=thirdparty%2Frrdtool-1.x.git when building the sgridstep in alt-y-grid mode, take the --base into consideration. git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@641 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 77a50513..43af7257 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1547,7 +1547,7 @@ calc_horizontal_grid(image_desc_t *im) 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;