I'm currently having trouble scaling TiKZ figures in LaTeX and wondering if anyone can help figure out what was going on, or suggest a smarter way to do things.

I'm currently creating plots in MATLAB 2012a and then saving these as .tikz files using the matlab2tikz package. After I have created the .tikz file (i.e. test.tikz), I use the following code to include it in my TeX document.


Although I am able to include the picture, I can't seem to rescale it. In particular changing the fheight and fwidth from {3cm} to another figure does not seem to make any difference.

I'm also a lost in terms of finding the appropriate documentation for this approach to including figures in TeX files. Should I be checking out pgfplots or tikz? And should I be using the \input command or the \begin{tikzpicture} syntax.

  • 1
    For future reference, what would have been useful here would have been to see an example .tikz file. Well done for finding the solution yourself and for posting it here for anyone else stuck with this. Commented Apr 23, 2012 at 7:03

1 Answer 1


Just found out the answer to my problem :)

I was creating the figures in MATLAB using the code:

matlab2tikz( 'test.tikz')

I should have been creating them using the code:

matlab2tikz( 'test.tikz', 'height', '\fheight', 'width', '\fwidth' )

You must log in to answer this question.

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