Menu

#2688 The 'back' keyword has no effect for arrows in v6.0.0

None
closed-not-a-bug
nobody
None
2024-02-01
2024-01-31
Xavion
No

When I use the "set arrow" command -- and include the 'back' keyword -- the arrow is still shown in the foreground (of my area chart). In the attached files, the arrow is the horizontal yellow line.

This wasn't happening with v5.4.10.

Let me know if you need further explanation.

2 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2024-01-31

    I tried to reproduce this with a simple test case but I couldn't.

    set arrow 1 from -5,0.4 to 5,0.4 lw 4 back
    set arrow 2 from -5,0.2 to 5,0.2 lw 4 front
    plot sinc(x) with filledcurves
    

    Perhaps if you show the commands you used to generate the plot?

     

    Last edit: Ethan Merritt 2024-01-31
  • Xavion

    Xavion - 2024-01-31

    Thanks for having a go at reproducing this.

    I have attached the plot and data files I'm using. Much of it is probably irrelevant; sorry for the fact it's so complicated.

     
  • Ethan Merritt

    Ethan Merritt - 2024-01-31

    1) Your script generates scaling errors because after "set autoscale y2" the y2 axis range is not defined. If you want the last subplot to be autoscaled and plotted against y2 rather than y1 then you need to tell gnuplot that. The plot command would then be

    plot '3 Months-H.data' using 1:3 axes x1y2 with impulses lt 4 notitle
    

    2) The reason the yellow arrow is visible is that you have set the fill style for the plot to be transparent: set style fill transparent solid 0.10 noborder. Since it is transparent, you can see through it to the arrow in back. Try removing the keyword transparent.

    I get the same results from 5.4.10 and 6.0.0 both before and after making these changes, so I cannot explain why you saw a difference. Did you see a difference with any other output terminal, or only with "set term png" ?

     
    • Hiroki Motoyoshi

      As an another approach, if I add the transparent option to 'set term png ', 5.4 outputs similar results as 6.0.

      Could this be related to the following commit?

      commit a72cb572040360ff80932d7981cccdd893bac897
      Author: Ethan A Merritt <merritt@u.washington.edu>
      Date:   Fri Jan 13 13:53:38 2023 -0800
      
          png (gdlib): Change default to "set term png butt truecolor"
      
          Newer gdlib versions do a much better job of antialiasing,
          but only if truecolor is selected.
          On the other hand our previous workaround for bad antialiasing,
          "set term png rounded", has become very slow.
          Change the default to use the new antialiasing with butt linecaps.
      
          The jpeg, gif, and sixel terminals also now default to "butt".
      
       
      • Ethan Merritt

        Ethan Merritt - 2024-02-01

        Good analysis! Yes, if you are using the gdlib-based png driver then 5.4 defaulted to indexed color, whereas 6.0 defaults to 24-bit RGB + alpha color. The cairo-based png driver always produces 24-bit RGB + alpha in both 5.4 and 6.0. That is probably the explanation.

         
    • Xavion

      Xavion - 2024-02-01

      Thanks very much for the detailed reply.

      Re 1) Thanks for pointing that out. I have made the change you suggested. The errors are now gone.

      Re 2) Removing the 'transparent' keyword does fix the problem. Apologies for my lack of understanding.

      I just tried the 'pngcairo' terminal and the results were the same with v5.4.10 and v6.0.0. With 'transparent', I see the yellow line (on the blue background); without, I don't.

       
  • Ethan Merritt

    Ethan Merritt - 2024-02-01
    • status: open --> closed-not-a-bug
    • Group: -->
    • Priority: -->
     

Log in to post a comment.

MongoDB Logo MongoDB