TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using pgfplots, externalize an .avi file and using DVI>ps, externalize an .eps file on A4 but I want a figure with width and height of 10cm in letter (10cm x 10cm). How can I make it?

(If you know how to make a figure that be equal the page size.)

this is my code.

‎\setlength{\pdfpagewidth}{15 cm}‎ 
‎\setlength{\pdfpageheight}{15 cm}‎ 
   ‎ylabel={\textbf{ $f(x)$‎ }}
   ‎\addplot {x^2};‎
   ‎\addplot {x^3};‎
share|improve this question
do you want to convert an .avi file to .eps? – percusse Apr 9 '12 at 8:41
Will \centering{\resizebox{1\textwidth}{!}{your tikz file}} be useful? You have to include graphicx package for this. – Harish Kumar Apr 9 '12 at 8:56
thanks for your ansewer. – sayros May 4 '12 at 6:33
@HarishKumar Could you post this as an answer (with a little explanation)? – Joseph Wright May 6 '12 at 8:11
@JosephWright: Done and thanks. – Harish Kumar May 6 '12 at 11:30

To resize an image or picture to desired dimensions, you can either use \resizebox from graphicx package or adjustbox from adjustbox package.

The syntax for resizebox is

\resizebox{width}{height}{your tikz file}

If you want to keep the aspect ration the height can be replaced by !.

The full code will be

   ‎ylabel={\textbf{ $f(x)$‎ }}
   ‎\addplot {x^2};‎
   ‎\addplot {x^3};‎

But giving both width and height as 10cm may not keep the aspect ratio intact. Hence putting \resizebox{10cm}{!}{... will adjust the height so as to keep the aspect ratio.

The adjustbox may be used as


    % ..
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.