I produce a lot of plots in Matlab which I export to TikZ with matlab2tikz. In matlab2tikz I can specify the plot width and height, for instance. This works out quite nicely, but as I write my document I see that I should have changed the width and height to different values for several plots. Now, this is of course something I either could do in the matlab2tikz call or directly in the .tex file output from matlab2tikz. I have quite significant amounts of plots and most of them are created in "automated" procedures, so it would be nice if I could pass an argument to \input (or similar) which could manipulate the width and/or height of the plot. Something like:
\input[w=0.4,h=0.2]{plotfile}
and have something like this in plotfile:
\begin{axis}[%
width=w\textwidth,
height=h\textwidth,
]
Is there a solution to this?

\include-- that always starts a new page, and is most appropriate for pulling in new chapters. – barbara beeton Apr 30 '13 at 14:57tikzscalepackage. It’s written for scaling the picture to the exact size specified (unlike thewidthandheightoption ofpgfplotswhich doesn’t factor in the labels). – Qrrbrbirlbel Apr 30 '13 at 15:47tikzscale.pgfplotsdoesn’t know the exact dimensions of the labels so it doesn’t get the plot’s resulting width/height precisely as specified. See pgfplots: how can I scale to text width? – Qrrbrbirlbel Apr 30 '13 at 17:26