The current set mytics
command, which specifies minor tic frequency, is not particularly well-suited for use with logarithmic axes. Therefore, I propose introducing a new command specifically designed for finer control of minor tics on log-scale axes.
Proposed Syntax
set mylogtics m1 m2 m3 ...
set mylogtics 1 2 3 4 5 6 7 8 9
.set ytics logscale
) and overrides the set mytics
setting.set ytics nologscale
is specified, the 'mylogtics' setting is ignored, and the mytics
setting is used instead.There might be a more suitable name than "mylogtics".
Example
For example, with the setting:
set yrange [1:1000]
set mylogtics 1 5
Minor tics would be placed at: 1, 5, 10, 50, 100, 500, and 1000.
In matplotlib, the keyword argument subs
in LogLocator
has the role of minor tick setting like above description. https://matplotlib.org/stable/api/ticker_api.html#matplotlib.ticker.LogLocator
I have prepared a script that emulates the behavior of the proposed set mylogtics
command.
I would appreciate it if you could review it and let me know whether you find it useful.
I personally consider example plots 1, 2, and 3 in the emulation script to be terrible - to the point that I would consider it a bug if the program produced such a plot. The presence of minor tics with no corresponding major tics was, in fact, one of the complaints in Bug 2717.
Plot 4 is fine. But you can get that exact plot now with the script below.
Thank you for reply.
Well, I guess that’s true.
OK, this is not a very important point. I may have been asking for too much, so I’ll take it back.
Reviced Proposed Syntax Ver.2
set mylogtics 1 2 3 4 5 6 7 8 9
.The modified emulation_script is also attached.
I would be grateful if you could continue to give it some thought.
The plots in version 2 of the emulation script still look very wrong to me. When the spacing between major tics is more than one log unit, e.g. 10^0 10^2 10^4 10^6, it makes no sense to place multiple sets of minor tics between them. It does make some sense to place a single minor tic at each of the skipped major tics, (in this case 10^1 10^3 10^5). That is the final plot in your emulation script, but that's also what the program does now.
I think the proposed new command is addressing a need that doesn't really exist. I can't think of any type of real-world data presentation that would need them. Can you point to an example of one, maybe a figure in a published paper or textbook?
As you said, this may be a rarely used feature, but, as for me, there are cases where minor tics are too densely packed, and users may want to emphasize only the value 5, for example. The key point of this proposal is that minor tics should be placed precisely at the user-specified positions. Since the implementation would likely be complex, and I've also found that it's easy to achieve the same result using the method in the emulation script, I think it would be understandable if the proposal were rejected.
At the root of this proposal is the inadequacy of "mytics". It gives the impression that one can control the minor tics on a log scale, but in reality, it provides no meaningful functionality. For instance, if you use
set mytics 2
, it generates only one minor tic between 1 and 10, but the position is 5.5—which can easily be mistaken for 5.0 unless you look very closely. With that in mind, I think it would be better if "mytics" on a log scale simply acted as an on/off switch, regardless of what values are provided as the frequency value.For example,
Particle Data Group Collaboration 2024, 'Review of particle physics', Physical Review D, vol. 110, no. 3, 030001. https://doi.org/10.1103/PhysRevD.110.030001 [Open Access]
-> Fig. 11.4 (P.228), Fig. 19.2 (P.390), Fig. 37.1 (P.680) Fig 37.3 (P.681) Fig.37.6 (P.682)
gnuplot IN ACTION (Second edition) Philipp K. Janert.
-> Fig in P.43, Fig. 13.7 (P.298)