Yesterday I learnt how to make simpe plots using tikzpicture
and I'm very satisfied of the result:
\begin{tikzpicture}[thick,scale=0.6]
\begin{axis}[
xlabel=$\delta$,
ylabel=$U_2$]
\addplot[smooth,mark=*,blue] plot coordinates {
(1,4)
(4,2)
};
\addlegendentry{$\beta_2$}
\addplot[smooth,color=red,mark=x]
plot coordinates {
(1,0)
(4,9)
};
\addlegendentry{$\beta_1$}
\end{axis}
\end{tikzpicture}
However now I have to make more complex plots (e.g. boxplot) and I cannot think of doing it manually. Up to now I have a Matlab script which reads a certain amount data and generates a figure. I exclude to save it as .png anymore because I want a vectorial image inside my document.
The better way I found is to use matlab2tikz
. I tried it but it gives me errors. Because I cannot access newer versions of Matlab (which wouldn't resolve anything, I think, as the figure is generated without errors. The errors are when I compile LaTeX code.) and because I don't like to deal eternally with parser errors (I have few time so I cannot risk to loose too much time on this) I was looking for another way of doing it.
What do other people do when they want to add a vectorial plot from matlab/octave/gnuplot? Is matlab2tiks
the gold standard or is there some other way?
(I know that I could compute my personal tikz boxplot from raw data with a not-too-complex script, and I like the idea, but I'm guessing if there is already something that does it)
matlab2tikz
?.log
file and you'll find them.pgfplots
. On my system (a recently updated TeX Live 2013) your plot works fine. Install TeX Live 2013 from TUG.org (see e.g. tex.stackexchange.com/questions/1092/…) if you can.