I am currently modelling traffic and my map of roads consists of nodes connected with lines. For each road there is maximum capacity and amount of traffic and each road therefore has a utility value between 0 and 1.
To my question; I am wondering whether there is a colouring method for my lines in tikz that defines the colour by a value. For example I may want a high utility value to be red and a low utility level to be green and values in between are gradients of the booth. Is this possible in some way?
EDIT: The answer in the link is useful. I am now updating all my values to my lines manually; is there perhaps a way to retrieve them from a vector?
\documentclass{...}
and ending with\end{document}
.