|
From: Aapo L. <aap...@gm...> - 2006-07-13 15:33:13
|
On Wed, 2006-07-12 at 23:34 +0200, Hans-Bernhard Bröker wrote: > though that's only 9 minitic intervals per decade. What it should mean > in case the major tics are more than one decade apart is anyone's > guess. Your patch would place them at arithmetic intervals (1, 10, 20, > 30, 40, 50, 60, 70, 80, 90, 100), the existing code *wants* to place > them at geometric intervals (i.e. graphically equidistant, but at > numerically funny places, integer powers of 100^0.1), but fails. Yes, it is difficult to say what should be done, when the user wants, say 12 minitic intervals on a logarithmic plot with tic interval 100. Actually, the automatic system "set mytics default" appears to work in a rather sensible fashion, but unfortunately the user requested minitics are not honoured. Also, I think that for the user requested minitics the arithmetic intervals would be better, because the user requested minitics probably aren't in "nice" places (otherwise "auto" and "default" would be used) and for awkward positions the arithmetic intervals are by far easier to read and understand. Compare e.g. 100^(x/6) and x/6*100 as tic positions. Moreover, if the tics are at arithmetic intervals, you can immediately see that the plot has a logarithmic axis without looking at the numbers. In any case, the current behaviour is inconsistent with the documentation, AND completely chaotic. See, for example, the following plots: set logscale y set ytics 10 set mytics 10 plot [0:200] [1e-3:1e8] x**3 # that's good, mtics at 10, 20, 30, ... set mytics 6 plot [0:200] [1e-3:1e8] x**3 # good, 5 mtics at arithmetic intervals set ytics 100 # "set ytics auto" has the same effect plot [0:200] [1e-3:1e8] x**3 # but now there are 2 equidistant mtics! # also, notice that minitics above 0.1 and 1 are missing! # (without changing mytics, somehow mytics went from 6 to 3?!) set mytics 2 plot [0:200] [1e-3:1e8] x**3 # no mtics ... set mytics 3 plot [0:200] [1e-3:1e8] x**3 # now it's getting weird set mytics 4 plot [0:200] [1e-3:1e8] x**3 # now we only have 1 tic ... # ... but it is actually in a sensible place, no? Of course, if you put ytics interval at something big&weird (i.e. not a power of 10), the situation only gets worse. See: set ytics 313 set mytics 13 plot [0:200] [1e-3:1e8] x**3 # tic-tic-notic-tic-skip-tic-halfskip-... or even (fortunately nobody needs these crazy intervals in practice!) set ytics 313.345637 set mytics 13.3 plot [0:200] [1e-3:1e8] x**3 # hmm > In a nutshell, I concede there's a bug, but I think you've found the > wrong fix. True. You got me thinking that maybe Gnuplot should simply discard the logarithmic minitics asked, if the logarithmic interval is not "close enough" to 1..10, as is done now. As you said, it's not clear how the minitics should be placed, arithmetically or equidistantly. However, the documentation should be modified to reflect the current behaviour; and also, the current behaviour should be fixed. The documentation simply states that you get as many mtics intervals you ask, expect that you should get one less if you ask for ten for obvious reasons (that's what you want, anyway). But it doesn't tell you that you get arithmetic mtic intervals if [xyzc]tics <= 10*sqrt(10) =~ 31.6 and equidistant otherwise. In fact, it doesn't say anything about the mtics being either arithemtic or equidistant. And, it's not possible to choose between the two modes. > I would guess that was just because the existing code knows it would > fail in that case, and thus doesn't try to continue. Perhaps. But at least some of the bugs highlighted above may be caused by the 1.5 limit. In conclusion, it might be worthwile to add command "set m[xyzc]tics arithmetic/equidistant/auto" for logarithmic axis. For linear axis it would work all right, as arithemtic and equidistant would be the same for a linear axis. Anyway, something (tm) should be done, at minimum for the documentation. Best Regards, Aapo Lankinen |