I love matplotlibs colormaps. They are nice and easy way to improve graphic illustratations. Matplotlib provides this overview to all default colormaps. But is there a colormap resembling a traffic light scheme? If not, how do I customize a colormap to span from green to yellow to red?
Asked
Active
Viewed 5,384 times
2
-
2Since red and green are hard to distinguish by the colorblind, these are not usually used together in this way. – Stephen Rauch Oct 15 '17 at 19:55
-
2Though I see your point, there green/yellow/red are used quite often nontheless. In this particular case, I am trying to plot red-light-waiting times for a city and its traffic. It just seemed fitting... – Rachel Oct 16 '17 at 07:24
-
7`cmap = matplotlib.colors.LinearSegmentedColormap.from_list("", ["green","yellow","red"])` – ImportanceOfBeingErnest Oct 16 '17 at 20:18