plot() and plot3() do not use colormaps . They use ColorOrder property of the axes. Each line object that is drawn by plot() or plot3() is a single color that by default is chosen from a pre-determined list according to the order it is drawn, not according to the Z coordinate. It is not possible to use plot() or plot3() to have the line colored by Z coordinate.
If you want colored lines then see for example http://www.mathworks.com/matlabcentral/answers/285872-shading-with-plot3#answer_223465