# Scaling TikZ from Gnuplot export

Say we plotted in Gnuplot using terminal tikz resulting in output tikz.tex . In our main.tex we

``````\include{tikz}
``````

Now that messes up everything because the picture is way too large for our beamer document.

How can one scale down the tikzpicure without manually setting (e.g.) scale=.5 in tikz.tex? The reason I want to avoid manual scaling is that I have many tikz.texs and that they are not final yet.

• Could you show an example `gnuplot` code? From the `gnuplot` docs it looks like you have the option to define the size of the generated plot, e.g. `set size 8cm,4cm` – Torbjørn T. Mar 17 '16 at 13:03
• The `size` or the `scale` option of the terminal solves my problem. If you put that as an answer, I accept it. Thanks! – rehctawrats Mar 17 '16 at 13:15

## 1 Answer

`gnuplot` has some options for setting the size of the generated graphic, cf. the manual (http://www.gnuplot.info/documentation.html):

• `set size x{unit},y{unit}` to set the exact size in your unit of choice, for example `set size 6cm,4cm`. The default is 12.5cm x 8.75cm. (Valid units are `cm`, `mm`, `in` or `inch`, `pt`, `pc`, `bp`, `dd`, `cc`.)
• `set scale x,y` to scale the figure relative to the size.

For reference, the default papersize in `beamer` is 128mm x 96mm, see section 8.3 in `beamer`s manual.

And by the way, one would typically use `\input` not `\include` to add snippets of code, see When should I use \input vs. \include?.

• Notice the `scale` option is not available in all terminals, e.g. in wxt. See the terminals help via `set term terminalname help`. – rehctawrats Mar 18 '16 at 8:57