|
From: Daniel J S. <dan...@ie...> - 2006-06-23 07:39:22
|
To make bug 1004754 work properly and remove the grid line from outside the plot, I commented out the following lines of code from gen_tics() in axis.c:
/* {{{ a few tweaks and checks */
/* watch rounding errors */
// end += SIGNIF * step;
/* HBB 20011002: adjusting the endpoints doesn't make sense if
* some oversmart user used a ticstep (much) larger than the
* yrange itself */
// if (step < (fabs(lmax) + fabs(lmin))) {
// internal_max = lmax + step * SIGNIF;
// internal_min = lmin - step * SIGNIF;
// } else {
internal_max = lmax;
internal_min = lmin;
// }
Now I see what you were talking about, Hans. This SIGNIF is derived analogous to what I had proposed for TOL the other day. I think what I had proposed--which I'm now happy to do without--made a bit more sense than whatever this is attempting to do. Why (rhetorical question) would there be a need to tweak in any way the tic marks in such a visible way?
This should be straightforward x_i = tic * i + x_start and range check. [It also could have been done as x_i = ((last_tic - first_tic) * i) / num_tics.]
Note the use of an integer i to compute a tic location.
gen_tics() should be re-examined. I don't know if that should be done before 4.2 though.
Dan
|