绘图时“格式字符串中无法识别的字符u”

问题描述 投票:0回答:0

我有以下代码来绘制两线图:

fig, ax = plt.subplots(figsize = (14, 8.5))

plt.plot( 'anio', 'Índice de Progreso Social', data=indices, marker='o', markerfacecolor=PUR2, markersize=12, color=PUR, linewidth=5)

plt.plot( 'anio', "undamentos del Bienestar", data=indices,marker='o', markerfacecolor=OR2, markersize=12, color=OR, linewidth=3.5)

当我运行它时,出现下一个错误:格式字符串中无法识别的字符 u

调用列名“undamentos del Bienestar”时似乎有问题,但我不知道如何修复它。有人能帮我吗?谢谢!!

string matplotlib valueerror
© www.soinside.com 2019 - 2024. All rights reserved.