I want to draw a path/plot in TikZ whose shade depends on the coordinate. For example, I want say something like
\draw[color=black!\x] plot coordinates{ coord1 ... coord100};
i.e. the shade of the color depends on the coordinate of the point. In examples of using colour in TikZ documention that I found, the colour is set for the entire path, and does not change with the point. Is there a way to do what I want?