I have created this surface plot in Matlab and use the wonderful program Matlab2tikz to export it to LaTeX. It generates me a .tikz file and when I try to use it I get an error.
I have found out! that there are some lines in the code:
three times (there are three surfaces, I assume that is why).
If I comment these out it works. Does anyone know what is up? I can supply the code and a minimal example, but I thought this would be even more helpful in this case.
Btw. I know nothing about tikz except how to get them out of Matlab and into LaTeX, I know just a little about LaTeX.
Edit: The error I get is:
! Paragraph ended before \pgfplots@glob@TMPd was complete.
and it seems to be only sensitive to including the
addlegendentry lines. Including
amsmath does not remove the error.
Edit2: If this is not allowed, please let me know. The problematic file can be downloaded here. There is no copyright, it is made by me and is by no means secret or dangerous. The file contains three large sets of numbers and the problematic lines comes right after.
Edit3: This is how the picture, optimally, should look though with added legends. It has taken literally hours to get the colours right in Matlab, so it would be quite a defeat to not get them right in LaTeX.