#305 X/Y axis labels drawn inside plotting area

closed-works-for-me
nobody
2D plot (258)
5
2005-12-22
2005-11-09
kzoya
No

In the example below, the Y axis labels are drawn
inside the plotting area. The same problem occurs when
the X axis labels have a non-zero rotation.

(Note: these problems are in gnuplot 4.1, but not 4.0.)

set terminal jpeg
set key off
set style data linespoints
set xtics nomirror rotate by 90 ('JUL' 0, 'AUG' 1,
'SEP' 2)
plot '-' using 1:2, '-' using 1:2, '-' using 1:2
0 1244
1 8133766
2 9257640
e
0 2342155
1 9215806
2 10363119
e
0 4455902
1 14542634
2 3938775
e

Discussion

  • kzoya
    kzoya
    2005-11-09

     
    Attachments
  • kzoya
    kzoya
    2005-11-09

     
    Attachments
  • kzoya
    kzoya
    2005-11-09

    Logged In: YES
    user_id=1376084

    There may be two separate problems here.

    - First, the X axis labels are drawn inside the plotting
    area when the rotation is not 0.

    - Second, the Y axis labels and other labels are shifted to
    the right. The following example shows the Y axis labels, X
    axis labels, and title all shifted to the right. (The Y axis
    labels are not to the left of the Y axis, the X axis labels
    are not centered below the bars, and the title is not
    centered above the graph.)

    set terminal jpeg
    set key on Left reverse outside horiz bottom center box
    set boxwidth 0.9 absolute
    set style fill solid
    set style histogram rowstacked
    set style data histograms
    set xtics nomirror ('JUL 1996' 0, 'AUG 1996' 1, 'SEP 1996'
    2, 'OCT 1996' 3, 'NOV
    1996' 4)
    set title 'TITLE'
    plot '-' using 2 title 'A', '-' using 2 title 'B', '-' using
    2 title 'C'
    0 0
    1 20
    2 40
    3 60
    4 80
    e
    0 30
    1 40
    2 50
    3 60
    4 70
    e
    0 40
    1 45
    2 50
    3 55
    4 60
    e

     
  • Ethan Merritt
    Ethan Merritt
    2005-11-22

    Logged In: YES
    user_id=235620

    [after off-line correspondence with bug reporter]

    This seems to be a font installation or selection problem.
    It is unclear whether there is anything that gnuplot could
    do better in this case. As I understand it, explicitly
    specifying a font works.

     
  • Ethan Merritt
    Ethan Merritt
    2005-11-22

    • status: open --> open-works-for-me
     
  • Ethan Merritt
    Ethan Merritt
    2005-12-22

    • status: open-works-for-me --> closed-works-for-me