Placement of tick labels & Publishable figure

  • crux

    crux - 2007-02-18

    Hi all,

      Two things.

    1) I am unable to figure out how to place a tick label a little further from the axis.  I have a three dimension graph, and the labels for each tick are overlapping the axis line, so I want to move them away the axis just a little bit.  I can set the axis label just fine.  Below I have included by gnuplot script and a section of the input text file.

    2) I plan to publish graphs will be published in an research article. I believe the script below is optimal for publishing the resulting graph, but would appreciate any suggestions to improve the quality of the graph.

    Many thanks in advance.



    set angles degrees
    set term postscript eps enhanced "Arial Bold" 28
    set key off
    set size 0.85,1.0

    set xlabel "Phi" -2.000000,-0.700000
    set ylabel "Psi" 3.000000,-0.200000
    set zlabel "Omega"

    set xrange [-180:180] noreverse nowriteback
    set yrange [-180:180] reverse nowriteback
    set zrange [-180:180] noreverse nowriteback

    set grid xtics nomxtics ytics nomytics noztics nomztics \ nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics
    set grid layerdefault linetype -1 linewidth 2.000, linetype -1 linewidth 2.000

    set xtics (-180,-90,0,90,180)
    set ytics (180,90,0,-90,-180)
    set ztics (-180,-90,0,90,180)

    set view 45,50,1,1
    set border 15+112+768 lt -1 lw 6.000
    set output ""
    splot "Phi_Psi_Omg.txt" every 1 using 2:3:4 with points pointtype 7 pointsize 0.1 title ' '

    1.00    -71.629759    -173.953504    67.182774
    2.00    -65.537176    177.385946    78.575806
    3.00    -70.027669    -170.286149    70.988830
    4.00    -76.506703    168.442583    79.572931
    5.00    -68.708259    -162.632357    66.371336
    6.00    -59.071077    177.652841    83.563582
    7.00    -84.116070    -176.201368    68.184540
    8.00    -69.540662    162.820759    92.609683
    9.00    -81.517391    -122.231062    69.670530
    10.00    -49.937094    -63.843867    85.660138

    • D. Scott Katzer

      D. Scott Katzer - 2007-02-19

      Hi Karl,

      I think you can do what you want with the "set label ..." command.  Specifically, in the Help look at the 'offset' and 'rotate by' parameters for the "set label ..." command.

      Note that you can only rotate the xyz-labels in 2D plots.  To have more control over them in 3D plots (splot) I think you need to keep the xyz-labels blank and position generic labels on your own.

      The LANL gnuplot pages (set label) may help too.

      As far as making the plot publication-ready, I'm not sure why you've made the choices for the line style, line widths and point sizes given above.  It looks very strange here - the defaults of width 1 and a positive line style look much better to me.  Have you started your plot instructions with "reset" to clear out previous gnuplot settings?  In general, I usually try to know the final size of the graph in the publication and adjust things from there, keeping in mind the publications requirements for minimum font height and minimum datapoint sizes.  Check out the gnuplot demos and LANL pages for examples of 3D plots (I can't offer other pointers there).

      I think it's a good idea to end the gnuplot instruction file with an explicit "set output" line to explictly close the .ps output file.

      HTH a bit.  Good luck.


    • Hans-Bernhard Broeker

      The 3D tick labels' positioning is somewhat complex.  It suffers even more than other aspects of plot layout from gnuplot's lack of information about exact font metrics on its output devices.

      Changing the font size can help.  As can putting excess blanks at the start and end of the tick label strings (or format string).


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks