eps figures

Help
Anonymous
2003-10-23
2003-10-23

  • Anonymous
    2003-10-23

    Dear all,
    I created eps figures using
    'set terminal postscript eps enhanced'
    However, I am unable to center the figure in my LaTeX documents. I guess the %%BoundingBox is too big (?). Does anybody know anything about this (?) problem ?
    Regards, Martin

     
    • The %%BoundingBox generated by gnuplot isn't always pixel-perfect, right.  But it's not all that bad that you should completely fail to center the image, either.

      You'll have to go into more detail about the circumnstances, e.g. show a complete example of the problem, including the inputs to both gnuplot and LaTeX, and the versions of both tools.

       

      • Anonymous
        2003-10-23

        Dear Hans-Bernhard,
        thank you for your kind reply. I use gnuplot 3.7.3.
        I created a plot from a data file, using the following commands:
        set terminal postscript eps enhanced
        set encoding iso_8859_1
        set size square
        set grid
        set xlabel 'Elemente in {/Times-Italic P}'
        set xr [0:35]
        set yr [0:40]
        set key 30,38
        set ylabel 'Distanz {/Times-Italic d_{pos}}'
        set title 'Durchschnittswerte fr {/Times-Italic C_{max} , T_{max}}'
        set output 'pic_cmax_tmax_schnitt_pos.eps'
        # and finally:
        plot 'cmax_tmax.txt' u 2:3 t 'Modellinstanz' w points pt 6 ps 1, 'benchmark.txt' u 1:2 t 'Durchschnitt' w lines lt 1 lw 3

        The created pic_cmax_tmax_schnitt_pos.eps was included in a LaTeX (version 3.14159 (Web2c 7.3.7x)) file with the following commands:
        \begin{figure}
        {\includegraphics[width=10cm]{pic_cmax_tmax_schnitt_pos.eps}}
        {\renewcommand{\baselinestretch}{1}\caption[caption]{\label{fig:cmax:tmax:schnitt:pos}Durchschnittliche
        Abstnde der Positionsmetrik fr $C_{max},T_{max}$.}}
        \end{figure}

        The create eps file contains the following BoundingBox statement:
        %%BoundingBox: 50 50 410 302

        I openened the file with gsview, version 3.6 and saved it using the 'Ps to EPS' menu which gave me a new file with the BoundingBox:
        %%BoundingBox: 53 49 298 296

        Will this help? Can I provide the files (how?)?
        Kind regards, Martin

         
    • The "set size square" in the gnuplot command is your problem.  Without that, the bounding box output by gnuplot would be a lot tighter.

      To get around that, it may help to have another
      "set size" command *before* the "set terminal", which is manually tailored to give a rough estimate of the actual size of the plot, e.g.

          set size 0.75, 1

       

    • Anonymous
      2003-10-23

      Dear Hans-Bernhard,
      you were perfectly right. It works!
      Thank you & best wishes,
      Martin