-1

I am trying to write french characters in python 2.7 like this:

plt.xlabel("Débit")

But, I had this error:

ValueError: matplotlib display text must have all code points < 128 or use Unicode strings

Is there a solution to write it please?

JE_Muc
  • 5,403
  • 2
  • 26
  • 41
Joe
  • 85
  • 1
  • 9

1 Answers1

2

The error ValueError: matplotlib display text must have all code points < 128 or use Unicode strings tells you to use a unicode string, so:

plt.xlabel(u"Débit")
Netwave
  • 40,134
  • 6
  • 50
  • 93