Menu

#2496 cairolatex + multiplot + clear -> hidden tic labels

None
closed-not-a-bug
nobody
None
2022-08-14
2022-02-10
Anonymous
No

In the PDF produced by this

set terminal cairolatex pdf standalone
set output "test.tex"
set multiplot
plot sin(x)
set origin 0.5,0.5
set size 0.4,0.4
clear
plot cos(x)
unset multiplot

the tics labels of the inner plot do not show (see test_1.pdf, attached). Removing the clear command make them appear again (test_2.pdf, attached).

version 5.4.3, Linux.

2 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2022-02-10

    Not a bug. You need to re-order the elements of the graph to get what you want. I think it is sufficient to add one command:

    set multiplot
    set tics front      # draw the tic labels after drawing the plot
    plot sin(x)
    set origin 0.5,0.5
    set size 0.4,0.4
    clear
    plot cos(x)
    unset multiplot
    

    A detailed explanation would require both a discussion of the order in which various "layers" of the graph are built up, and the mechanism by which graphics and text components are mixed together by the various gnuplot TeX terminals. Start with help layers and the description of the back/front text attribute in help set term cairolatex

     
  • Ethan Merritt

    Ethan Merritt - 2022-02-10
    • status: open --> open-not-a-bug
    • Group: -->
    • Priority: -->
     
  • Emmanuel LE TRONG

    Thanks. I ended up doing something like that, thinking it would be a temporary fix. It indeed taught me about layers !

     
  • Ethan Merritt

    Ethan Merritt - 2022-08-14
    • status: open-not-a-bug --> closed-not-a-bug
     

Log in to post a comment.

MongoDB Logo MongoDB