plt.xlabel color code example
Example 1: matplotlib color
Alias Color
'b' blue
'g' green
'r' red
'c' cyan
'm' magenta
'y' yellow
'k' black
'w' white
Example 2: legend text color matplotlib
import matplotlib.pyplot as plt
l = plt.legend()
for text in l.get_texts():
text.set_color("red")