简体   繁体   中英

Write french characters in python 2.7

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?

错误ValueError: matplotlib display text must have all code points < 128 or use Unicode strings告诉您使用unicode字符串,因此:

plt.xlabel(u"Débit")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM