Menu

#2144 tics do not follow layer order, always under back at least

None
closed-invalid
nobody
tics (4)
2019-02-27
2019-02-25
Leosenko
No

The manual for 5.2 says the order of drawing is:
The order of drawing is
behind
back
the plot itself
the plot legend (‘key‘)
front

There seems to be bug in tics which look like they do not follow this order, they seem to be below back. MWE

set xrange [1:10]
set yrange [-2:2]
unset key
unset grid
set arrow 1 from first 0,0 to first 11,0 nohead lt 4 lc 1 lw 3 dashtype solid back
f(x)=1
plot f(x), sin(x)

The arrow is set to be in the back and thus behind the plot thus behind the tics. While it is behind the axis it is above tics. Tested in 5.2.6 build from source on Debian Linux and 5.0.5 distributed with Debian Stretch and in qt and epscairo terminals.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2019-02-26

    set tics front will move the tics to the front.

     
  • Ethan Merritt

    Ethan Merritt - 2019-02-27
    • status: open --> closed-invalid
    • Group: -->
    • Priority: -->
     
  • Leosenko

    Leosenko - 2019-02-27

    What is the reason for closing? It seems as a bug as it behaves differently than documented. While set tics front is a workaround, it does not explain why this behaviour is correct. Based on documentation, tics should be placed at the level of plot itself.

     
  • Ethan Merritt

    Ethan Merritt - 2019-02-27

    What section of the documentation are you referring to?

     
  • Leosenko

    Leosenko - 2019-02-27

    P. 43 Layers states:
    The order of drawing is
    behind
    back
    the plot itself
    the plot legend (‘key‘)
    front
    And since in the section about tics there is no mention of where it goes by default (the layer) and since axes behave differently than tics, thus the conclusion of erroneous behaviour of tics (especially since tics should, in the layer sense, behave in the same way as axes since they logically are part of axes, you do not really want to have a plotted function above axes and behind tics, that is just strange). Further, as I mentioned in the MWE, set arrow 1 from first 0,0 to first 11,0 nohead lt 4 lc 1 lw 3 dashtype solid back does not put the arrow behind the tics unless set tics front, as you suggested, is specified.

     

    Last edit: Leosenko 2019-02-27
    • Ethan Merritt

      Ethan Merritt - 2019-02-27

      You are mis-interpreting that section. It says nothing about which layer things appear in by default, other than the layer consisting of "the plot itself", i.e. the lines in a line plot, points in a point plot, etc. It is telling you that if you want something (a label, a rectangle, xtics, whatever) drawn before other things you can assign it to the "behind" or "back" layers. If you want it to be drawn after other things you can assign it to "front". And so on. If you want the tics in front, say "set tics front". That's really all there is to it.

       

Log in to post a comment.

MongoDB Logo MongoDB