# How to export a 3D quiver plot from MATLAB with matlab2tikz correctly?

Using matlab2tikz version 1.0.0 the MATLAB code

scatter3([0 1],[0 1],[0 1]);
hold on
quiver3(0,0,0,1,1,1,0);
matlab2tikz('test.tex');


produces

and the tex file test.tex. Plotting this file without changing anything in tex via

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\input{test}
\end{document}


produces

because matlab2tikz converted the arrow in the matlab plot to

\addplot3 [arrow1] coordinates{(0,0,0) (0.9,0.9,0.9)};


In this case scaling the arrow by 1/0.9 in the MATLAB code or correcting the coordinates manually in tex helps. But often scaling the arrows before exporting the plot doesn't even help, it still gets plotted with the same wrong length. The scaling factor always seems to differ from plot to plot.

What can I do?