Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using matlab2tikz to generate the tikz code for my figures. When compiling the document with the figure code as below, I get an ovelapping with the axis label y and z.

Here is what I've got:

enter image description here

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{pgfplots}

\newlength\figureheight
\newlength\figurewidth

\begin{document}

\begin{figure}
\setlength\figureheight{6cm} 
\setlength\figurewidth{6cm}
\begin{tikzpicture}

\begin{axis}[%
view={45}{-30},
width=\figurewidth,
height=\figureheight,
scale only axis,
xmin=0, xmax=10,
xlabel={x},
ymin=0, ymax=10,
ylabel={y},
zmin=0, zmax=10,
zlabel={z},
axis lines*=left]
\addplot3 [
color=red,
only marks,
mark=o,
mark options={solid}
]
coordinates{
(1,1,1)(2,2,2)(3,3,3)(4,4,4)(5,5,5)(6,6,6)(7,7,7)(8,8,8)(9,9,9)(10,10,10) 
};

\end{axis}
\end{tikzpicture}%

\end{figure}

\end{document}

Is there exist a way to solve it?

share|improve this question

closed as too localized by Qrrbrbirlbel, lockstep, percusse, egreg, Martin Schröder Oct 24 '12 at 12:44

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
It is my first post here, it seems to be a great community, I've been reading some other post and found them really interesting. –  Carlos Oct 23 '12 at 22:28
1  
\figurewidth and \figureheight throw errors. Please add a minimal working example (MWE). If I remove those two lines, the plot is compilable. Although the pgfplots' style is very different to your image. –  Qrrbrbirlbel Oct 23 '12 at 23:24
    
I forgot to put them, now I added the MWE. –  Carlos Oct 24 '12 at 0:05
1  
@Carlos Include the name of the user you are answering to (as I did now) so that they will be notified, that you have left them a message. If I compile your MWE, all is fine. Is your TeX distribution updated? What version of TikZ/pgfplots do you use? Hint: \listfiles –  Qrrbrbirlbel Oct 24 '12 at 0:47
1  
Finally I updated my Latex version, it resolved my problem, now the plot is like the posted by @Qrrbrbirlbel. –  Carlos Oct 24 '12 at 11:47

Browse other questions tagged or ask your own question.