|
From: Daniel J S. <dan...@ie...> - 2006-06-15 15:00:19
|
Hans-Bernhard Br=F6ker wrote: > Daniel J Sebald wrote: >=20 >> 2) BUG 1503114 FIX: 1107709 plot [-1:1] x is plotted with >> asymmetric y-axis >=20 >=20 > I'm still just as opposed to this fix as I was when I first commented o= n=20 > the bug report. It's an attempt at fixing symptoms, and does so in the= =20 > wrong place. >=20 >> I picked a bug in the list and fixed it. =20 >=20 >=20 > Not really. You just hid it in a spot where it's harder to trigger. I'm still debating with myself if this is the case. >=20 > Floating-point rounding is tricky stuff. It's completely inevitable=20 > that sometimes, results will surprise people. All this patch does is=20 > move the surprise from a seemingly obvious place to a less obvious one.= =20 > An axis ending at 2.0000001 has no more business being artificially cu= t=20 > down to 2.0 than one ending at 2.001. I think it does in some cases, and depends on the range. I'll illustrate= with two ranges determined by the data input. 1) [1.9999999 : 2.0000001] 2) [-2.0 : 2.0000001] In the first case, yes definitely, the limits have no business being arti= ficially shrunk. However, in the second case I'm saying that cutting the upper limit inwar= d to 2.0 rather than rounding outward to 2.5 is not egregious because its= effect is beyond the resolution of the plot. That is the key point. Th= ere is enough slop in gnuplot's tic marks and line placement that 1e-6 is= irrelevant with respect to 0.5e0. (Just take a look at some of gnuplot'= s outputs for all.dem. Some times pm3d surfaces slightly overlap a line,= sometimes not, the thickness of a line may be several orders of magnitud= e than what would be discarded by rounding inward, etc.) One might claim that it is possible to zoom in on plots and hence we shou= ld retain [1.9999999 : 2.0000001]. But I think that isn't reliable. Som= e examples. If I zoom into a plot using gv, really zoom in, the thing sl= ows way down and may become unreliable because of arithmetic issues. We = also had a discussion once on X11 zooming. I thought one could zoom by c= hanging the scaling factor in the X11 window. This worked, but I then ag= reed with you that it is a fairly useless thing without a fresh, nicer re= plot with scale readjustment. >=20 > The current behaviour may not be free from surprises, but at least it's > correct: an autoscaled axis always contains all its inputs. Define correct when we are talking that scale of things. I think that is= the issue here. Do we expand the scale outward, perhaps further comprom= ising resolution? Or feel free to toss out something that is beyond the = resolution of any reasonable plotting device that can be viewed by the hu= man eye? In some sense related, I just put a patch on S.F. to illustrate some prob= lems with the function integration demo in bivariat.dem. There are some = noticeable effects overlooked there, one of them being consideration for = sample points not being exactly zero for a test x>=3D0. Yes, dealing with machine precision may not be a joy, but it probably sho= uld be done. Dan |