author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 15 Apr 2002 21:29:24 +0000 (21:29 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 15 Apr 2002 21:29:24 +0000 (21:29 +0000) | ||
commit | dd7a80457423c23c6d6d9cc05b46ced2a3ec2dc6 | |
tree | a17b2a257010c0697725bf46434dbb82c9ffebf2 | tree | snapshot |
parent | a5e4941495ccd729d4777dfe2682e924bffbb715 | commit | diff |
Evenly-spaced y-axis gridlines.
I had to split horizontal_grid() into calc_horizontal_grid and
draw_horizontal_grid as the calculated info is needed in the adjustment
code. My previous patch had the problem that it adjusted the y-axis too
late, e.g. after the data lines was drawn.
The result of the calc is stored in struct ygrid_scale_t which
image_desc_t has as a member.
--no-gridfit is implemented.
The round-to-integer coordinates for png is moved to the libart code in
rrd_gfx. The 'close path' code is cleaned up so the node list is left
unchanged if you want to save the same graph in multiple formats in one
run. The rounding is done on the scaled coordinates (zoom).
I have made a simple version for logarithmic y scales as such a scale
might have 5 gridlines with 4 difference spacings. This version only
uses y = 10^x values for modifying the scale. -- Peter Speck <speck@ruc.dk>
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@123 a5681a0c-68f1-0310-ab6d-d61299d08faa
I had to split horizontal_grid() into calc_horizontal_grid and
draw_horizontal_grid as the calculated info is needed in the adjustment
code. My previous patch had the problem that it adjusted the y-axis too
late, e.g. after the data lines was drawn.
The result of the calc is stored in struct ygrid_scale_t which
image_desc_t has as a member.
--no-gridfit is implemented.
The round-to-integer coordinates for png is moved to the libart code in
rrd_gfx. The 'close path' code is cleaned up so the node list is left
unchanged if you want to save the same graph in multiple formats in one
run. The rounding is done on the scaled coordinates (zoom).
I have made a simple version for logarithmic y scales as such a scale
might have 5 gridlines with 4 difference spacings. This version only
uses y = 10^x values for modifying the scale. -- Peter Speck <speck@ruc.dk>
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@123 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_gfx.c | diff | blob | history | |
src/rrd_graph.c | diff | blob | history | |
src/rrd_graph.h | diff | blob | history |