Graphics, Figures & TablesMatlab Figure

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Luuk
Posts: 1
Joined: Fri Sep 28, 2012 2:06 am

Matlab Figure

Post by Luuk »

Hello everybody,

I created a figure in Matlab and converted it to a .tikz file, using the standard available files.

In my Latex file I'm using the tikz/pgf/pgfplots preambles (I'm actually using LyX). There I add the following code:

Code: Select all

\begin{figure} 	
\centering 	
\newlength\figureheight  	
\newlength\figurewidth  	
\setlength\figureheight{6cm}  	
\setlength\figurewidth{6cm} 	
\input{mysphere.tikz} 	
\caption{My plot} 	
\label{fig:velocity} \end{figure}
Now, this works perfectly for me. But the next thing I did was adding a legend in Matlab, and again converted in a .tikz file. Then Latex suddenly gives errors of missing }. Can anyone help me out? Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Matlab Figure

Post by cgnieder »

Hi Luuk,

Welcome to the LaTeX community :)
Luuk wrote:[...] But the next thing I did was adding a legend in Matlab, and again converted in a .tikz file. Then Latex suddenly gives errors of missing }. Can anyone help me out? Thanks!
I haven't used Matlab for years so I can't be sure but this sounds like a bug in the convertion from Matlab -> TikZ. Have you looked inside the »mysphere.tikz« file and tried to find the place where the brace is missing?
Anyway, in order to help you for the actual case you'd need to attach the »mysphere.tikz« file to your next post so we could take a look.

Regards
site moderator & package author
Post Reply