【发布时间】:2018-03-22 01:03:35
【问题描述】:
您好,第 6 行的语法无效
x = []
y = []
x2 = []
y2 = []
plt.plot(x,y,label=(+str(incur1)+ '/' +str(incur2))
plt.plot(x2,y2,label=(+str(incur2)+ '/' +str(incur1))
plt.xlabel ('Time')
plt.ylabel ('Ex Rate')
plt.title (+incur1+ '/' +incur2+ '/nEx Rate Data')
plt.legend()
以后会这样添加数据和日期时间
time = t.datetime
x.append(time)
y.append(first_exRtRate1)
尝试制作字符串
label1 = (incur1+ '/' +incur2)
label2 = (incur2+ '/' +incur1)
然后
plt.plot(x,y,label=(+str(label1))
还是错误 被告知缺少一个) 试过了
plt.plot(x,y,label=(+str(incur1)+ '/' +str(incur2)))
还是错误
【问题讨论】:
-
您缺少
) -
最后是什么?在末尾添加了一个 ) 现在错误已向下移动了一行
-
编辑帖子比将信息放在评论中要好。
-
抱歉总是忘记\
标签: python-3.x matplotlib