Menu

#1993 axis title issue with 5.2.0

None
closed-not-a-bug
nobody
None
2018-04-28
2017-11-13
No

I create all my gnuplots in automated fashion via code.

I am finding that version 5.2 patch 0 seems to have seriously altered the positioning of axis titles on 3D plots. They can be too far from the tic values, or on top of the tic values.

In earlier versions I found it necessary in most instances to use the offset parameter to get decent positions, and that works well enough, but now with 5.2 that logic is not working well.

Is it possible to put screen shots in bug reports?

A word file is attached containing a script and data. And screen shots from 5.0 and 5.2.

In the sample file, whatever was changed in 5.2 from 5.0 seems to have affected the x and y axis labels, but not the z axis.

1 Attachments

Discussion

  • Karl Ratzsch

    Karl Ratzsch - 2017-11-16

    You can upload text files (gnuplot scripts), screenshots in png or jpeg, anything except binary code i guess. Some people can't or don't want to open (foreign) MS Word files, however.

    Can you please also post the gnuplot commands your "code" issues, i.e. redirect them into a text file to c&p here? That'll make it easier to reproduce the problem.

     
  • Brian Murphy

    Brian Murphy - 2017-11-16

    attached zip file contains a pdf instead of a Word file.
    The following script is also in the pdf.
    The plot3d.dat file is in the zip.
    Thanks,
    Brian

    reset
    cd 'C:\ProgramData\XLRotor'
    set terminal wxt size 800, 600
    set termoption fontscale 1.0
    set title "Babbitt Temperature\nSample bearing - 2 Lobe sleeve"
    set xlabel "Axial, mm" offset 0,-0.75 rotate parallel
    set ylabel "Circumferential, degrees" offset 2.0,0 rotate parallel
    set zlabel "Temperature, Deg. C" offset 1,0 rotate parallel
    set zrange [ 50: 66]
    set ztics 50, 2, 66
    set grid xtics ztics back
    set lmargin 5
    set tics out
    set ytics offset 2
    set xyplane 0
    set hidden offset -1
    unset key
    splot 'plot3d.dat' nonuni mat index 0 w l lt 8 , \
    '' nonuni mat ind 1 w l lt 8

     
  • Brian Murphy

    Brian Murphy - 2017-11-16

    I forgot to say that the axis offset values appearing in my script are determined by my own code which manually determines plot limits and tic intervals.

     
  • Ethan Merritt

    Ethan Merritt - 2018-01-04

    It is true that version 5.2 revised the code used to position 3D axis labels, in particular for the case "set [xy]label rotate parallel". This was part of a larger refactoring that funneled the rendering of all labels and titles through a single routine so that offsets, centering, layout, etc are treated uniformly.

    IMHO the revised behaviour gives better results than the previous code but as always opinions may vary. I would interpret the difference shown in the pdf file you uploaded as demonstrating that version 5.0 required manual adjustment of the y axis label by adding 'offset 2', whereas in version 5.2 the manual adjustment is no longer needed. But yes, I realize that this is annoying if the now unnecessary adjustment is hard-coded in an existing script.

     
  • Ethan Merritt

    Ethan Merritt - 2018-01-04
    • status: open --> open-not-a-bug
    • Group: -->
    • Priority: -->
     
  • Brian Murphy

    Brian Murphy - 2018-01-05

    Thanks for the reply, Ethan. I can appreciate the difficulty of getting label positions to be good in all situations. I've attached a short script, data file and plot you may want to examine. The splot was made with 5.2.2, and uses default label positions. One of the axis labels is completely obscured by the tic labels. Did I do something wrong to cause this?

     
  • Ethan Merritt

    Ethan Merritt - 2018-01-05

    To the best of my recollection the position of the Z axis label in a 3D plot has never taken into account the ztic format or the expected width of the resulting character string. Example

     set zlabel "Z axis label" rotate
     set ztics 25
     set format z "%.2f"
     splot x*y
     pause -1
     set format z "%.8f"
     replot
    

    Tested on gnuplot 4.6 5.0 and 5.2

    So yeah, if the z tic labels are wider than usual you would need to move the z axis label out of the way. This is not new in 5.2, although as I said all labels and titles now use a shared output routine so the precise positioning of any particular one (Z axis label in this case) may have changed slightly.

     
  • Ethan Merritt

    Ethan Merritt - 2018-04-28
    • Status: open-not-a-bug --> closed-not-a-bug
     

Log in to post a comment.

MongoDB Logo MongoDB