I've been trying to follow the instructions here to set the color of many lines along a grayscale using floats from 0.
(white) to 1.
(black). The function line.set_color()
accepts the floats, but the error below appears when I do plt.show()
:
ValueError: to_rgba: Invalid rgba arg "1.0"
to_rgb: Invalid rgb arg "1.0"
cannot convert argument to rgb sequence
In this answer it is explained how to do that using plt.cm.RdYlBu(i)
. Is there any equivalent for grayscale?