[rrd-developers] Re: placement of y-axis gridlines

Tobias Oetiker oetiker at ee.ethz.ch
Fri Apr 12 07:39:53 MEST 2002

Yesterday Peter Speck wrote:

> 1) change ytr() so it always return non-truncated coordinates (with all
> decimals). Specific imageformat implementations (in rrd_gfx) might
> truncate coordinates to integer values or to fixed-decimal (and might
> do it only for straight vertical/horizontal lines).
> 2) change calculation of the y-axis range so that all minor and major
> y-gridlines happends to fall on integer y-values.
> Solution nr 2 requires that it is allowed to modify the y-axis range
> (even if --rigid?). It should however, normally just be a minor
> extension of it, so it might/should not be a problem.
> For testing this concept, I have implemented both solutions (for
> non-logarithmic), as they work together. Solution nr 1 is implemented by
> this patch:
> http://www.vitality.dk/rrdtool/yaxis-adjust/2002-04-11-yaxishires.diff
> note that I have hacked the fileformat specific truncate for PNG into
> ytr() for this concept test.
> and nr 2 by this:
> http://www.vitality.dk/rrdtool/yaxis-adjust/2002-04-11-yaxisadjust.diff
> When having this, the screendump for PNG output now looks like this:
> http://www.vitality.dk/rrdtool/yaxis-adjust/even-height.png
> (even when disabling the PNG truncate!)

Hi Peter,

I guess approach 1 is valid in any case, but approach 2 is neat as
the resulting graph will look better, expecially when the gridlines
are tight ...

How about having n2 as default but nr1 as an option to replace n2
if I do not want any changes ... --no-gridfit or something.


 ______    __   _
/_  __/_  / /  (_) Oetiker, ETZ J97, ETH, 8092 Zurich, Switzerland
 / // _ \/ _ \/ / phoneto:+41(0)1-632-5286  faxto:+41(0)1-632-1517
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://google.com/search?q=tobi

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://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-developers mailing list