3

I have created some graphics in gnuplot using set terminal epslatex color and I rather liked them in my paper. However, once I tried to put them into Latex Beamer slides the way I put them into my paper,they where to big.

I reference the genrerated *.tex file like this:

\begin{figure}[htp] 
  \input{./path/to/*.tex}
\end{figure}

This file contains the labels and axises, which are in latex and make it look so nice. The file in turn references the actual graph (a pdf file, generated from the corresponding eps file, which gnuplot made) using an \includegraphics

Now I want to resize it to, say 90% of the free space on a slide. Setting \includegraphics[keepaspectratio=true,height=0.7\paperheight] alone won't do, since then the picture is smaller, but the labels are still the same.

How do I make both smaller: the stuff in the *.tex file and the included image? Bonuspoints, when I do not have to go back to gnuplot and regenerate the graphics from scratch.

2
  • 1
    Have you tried \resizebox? You put all your stuff in a box and set its size to fit your slide Jan 21, 2013 at 14:39
  • I didn't know that one and it does exactly what I want it to. If you would post that as an answer I can 'accept' it. Or I could post it myself.
    – albifant
    Jan 21, 2013 at 14:52

1 Answer 1

3

You could try the command \resizebox{width}{height}{box}. For exemple:

\resizebox{!}{.7\paperheight}{code of the box to resize}

will resize your box to 70% of the paper height, with respect to aspect ratio.

Note that if you provide both width and height, the aspect ratio will not be kept.

1
  • To make it complete: \resizebox{!}{\textwidth}{\input{./path/to/*.tex}} is what I used.
    – albifant
    Jan 21, 2013 at 15:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .