我试图在同一图形上绘制两个折线图。但是,可视化仅显示一行。
这是我在python visual中拥有的字段,“支出2018”和“支出2019”是度量
这是我在python脚本编辑器中的代码:
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset = pandas.DataFrame(Week of,Year,Spend 2018, Spend 2019)
# dataset = dataset.drop_duplicates()
# Paste or type your script code here:
import matplotlib.pyplot as plt
line1 = dataset.plot('Week of','Spend 2018',color="#333333")
line2 = dataset.plot('Week of','Spend 2019',color="#999999")
plt.show()
如何同时在图形上显示2018年和2019年的线条?预先感谢!