Using pgfplot externalize with .eps output in letter 10cm*10cm

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.

\documentclass{report}‎
‎\usepackage{pgfplots}‎
‎\usepgfplotslibrary{external}‎
‎\tikzexternalize{question}‎
‎\setlength{\pdfpagewidth}{15 cm}‎
‎\setlength{\pdfpageheight}{15 cm}‎
‎\newpage‎
‎\thispagestyle{empty}‎
‎\begin{document}‎
‎\pgfplotsset{width=10cm,height=10cm}‎
‎\begin{tikzpicture}‎
‎\begin{axis}[‎
‎xlabel={$x$}‎,
‎ylabel={\textbf{ $f(x)$‎ }}
]
‎\end{axis}‎
‎\end{tikzpicture}‎
‎\end{document}

-
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

\usepackage{graphicx}
...
...
...
\begingroup
\centering
{\resizebox{10cm}{10cm}{
\begin{tikzpicture}‎
‎\begin{axis}[‎
‎xlabel={$x$}‎,
‎ylabel={\textbf{ $f(x)$‎ }}
]
‎\end{axis}‎
‎\end{tikzpicture}‎‎}}
\endgroup


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

\usepackage{adjustbox}
...
...
...