I'd like to create an image in latex like the one below I created in matlab (matlab2tikz is not able to transform my original figure into tex code).
I just need to know how to create a line that changes its color according to some z value. I have the (x,y) coordinates + the z value for each point. Lets supose the first point is (55,35,70), then I need a line from the origin (0,0) to the point (55,35) that changes its color (colormap/jet)
\documentclass[12pt,a4paper,twoside,openright,numbers=noenddot,chapterprefix=true]{scrbook}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\pgfplotsset{colormap/jet}
\begin{tikzpicture}
\begin{axis}[%
width=4.521in,
height=3.566in,
at={(0.758in,0.481in)},
scale only axis,
colormap/jet,
xmin=0,
xmax=100,
ymin=0,
ymax=100,
axis background/.style={fill=white},
axis x line*=bottom,
axis y line*=left]
\addplot3 [solid, point meta=explicit, forget plot]
table[row sep=crcr]{%
0 0 0\\
72.80798 91 98\\
};
\end{axis}
\end{tikzpicture}%
\end{document}
but the line I get is a black one.... no colormap at all