|
From: Ethan M. <merritt@u.washington.edu> - 2013-06-28 18:14:53
|
On Friday, 28 June 2013, Juhász Péter wrote:
> On Thu, 2013-06-27 at 16:13 -0700, Jonathan Thornburg wrote:
> [snip]
> > the label disappears for level 1
> > (minor) tics. For example,
> > set xtics (1, 2 1, "" 3 1, "" 4 1, 5 1, "" 6 1, "" 7 1, "" 8 1, "" 9 1, 10)
> > or
> > set xtics ("1" 1, "2" 2 1, "" 3 1, "" 4 1, "5" 5 1, "" 6 1, "" 7 1, "" 8 1, "" 9 1, "10" 10)
> > each produces a graph with the 2 and 5 labels missing (i.e., only 1 and
> > 10 labels are present). This behavior is also present for a linear-scale
> > plot,
> [snip]
>
> I asked a similar question some months ago and I was told that minor
> tics don't have labels, by definition.
>
> As far as I know, there is no workaround, because you only have minor
> tics (that don't have labels) and major tics (that may have labels), and
> you can set different sizes for only these two, but all major tics have
> the same length.
>
>
> One possible solution that does not break compatibility with the
> existing definition, but provides variable length tics:
Another option is to relax the restriction that tic levels can only be
"major" (level 0) and "minor" (level 1). The code already tracks tic level
as an integer but ignores requests for tic level 2 or 3 etc. It should be
easy to modify the code that so that you can add labels using
set xtics add ("Level 2" 2 2)
I'm not sure what length tic (if any) to assign at higher levels.
> Allow the third number (the tic level) in the "set tics" specification
> to be a real number instead of an integer. There would still be two tic
> length settings, one for major, the other for minor tics, and the actual
> length of a tic would be calculated by interpolating between the two
> pre-set lengths (tic_len = tic_level * (minor - major) + major).
Sounds too complicated.
> Any tic level that is not 1 could have labels.
Yes - this. Want to send a patch?
Ethan
|