I´m trying to color multiple curves of a line in rainbow colors wiht tikz. I´ve found the [wave] option for color from the xcolor pagacke, but I can't get it to work inside tikz's draw command.
\documentclass{article}
\usepackage{tikz}
\usepackage{xcolor}
\begin{document}
\begin{tikzpicture}[scale=0.5]
\draw[help lines] (-9.9,-9.9) grid (9.9,9.9);
\draw[very thick,->] (-10,0) -- (10,0) node[above]{$x$};
\draw[very thick,->] (0,-10) -- (0,10) node[above]{$y$};
\foreach \x in {-9,...,9} \draw[shift={(\x,0)},scale=2] (0pt,2pt) -- (0pt,-2pt);
\foreach \y in {-9,...,9} \draw[shift={(0,\y)},scale=2] (2pt,0pt) -- (-2pt,0pt);
\foreach \k in {1,...,10} %\pgfmathsetmacro{\faktor}{(\k-1)*40+380}
\draw[very thick] (0,11-\k) -- (\k,0);
\end{tikzpicture}
\end{document}
I´ve tried to do something like
\draw[color[wave]=\factor]
but it didn't work.
Do you have any ideas?
\draw[red]
for example.