Commands:
set xrange [ 1e6 : 1e8 ]
set logscale x
set xtics 10
plot x
results in no tics on x-axis, and gnuplot writes:
"warning: Too many axis ticks requested (>1e+07)"
Change first line to
set xrange [ 1e6 : 1e9 ]
or eliminate the third line (set xtics 10), and the error is gone.
(gnuplot v6.0.4, win11 64-bit 25H2)
Similar bug report: https://sourceforge.net/p/gnuplot/bugs/1971/
Diff:
But the error message is correct, right? What tick placement are you trying to obtain?
I disagree. There should be no error message. On x-axis with logarithmic scaling and "set xtics 10" I expect major tic on every decimal-multiple value, and 8 minor tics between major tics (for 2-, 3-, 4-, 5-, 6-, 7-, 8-, 9-multiple). The range 1e6-1e9 contains 28 tics. The range 1e6-1e8 should contain 19 tics, and that is far from "1e+07" tics, therefore the message is nonsense.
The syntax is
set xtics <start>,<increment>{,<end>}. For log scale axes the increment is multiplicative rather than additive.So to place major tics as you describe, the command would be
set xtics 1.e6, 10Which is what you get by default.
Minor tics are a separate command, but what you describe (I thiink) is also what you get by default.
The syntax is
set xtics <incr> | <start>, <incr> {,<end>}, so my commandset xtics 10is correct too, actually it is equivalent to your commandset xtics 1.e6, 10.Neither your command nor my command produce meaningful x-axis tics. Only default setting of xtics (no command) produces correct tics on x-axis, even though the default settins should be eqivalent to:
set xtics 10or
set xtics 1e6,10or
set xtics 1e6,1e8Hmm. OK. I saw something else initially but now I can reproduce your report. I don't know what is going on here.
It turns out that the failure was due to round-off error in testing initial tickmark placement against the range endpoints. After adding an allowance for floating-point round-off to integer values everything seems to be working.