给出:
Month = ["Jan","Feb","Mar","Apr","May","Jun"]
Apple= [500,180,1141, 1209, 600,1200]
Orange= [900,350,198,789,650,500]
Cherry = [852,415,874,404, 692,444]
list = {'Month': Month,
'Apple': Apple,
'Orange': Orange,
'Cherry': Cherry}
我正在尝试绘制一个折线图,其中x = Month和y = Apple:Cherry在1)一张图以及所有3个变量(Apple,Orange和Cherry)和2)折线图中每个变量(x =月,y =苹果等)。
我已经尝试过遍历各列,如下所示,但似乎无法通过Seaborn进行工作:
for i in range (df.shape[1]-1):
sns.lineplot(x=df[:,0], y=df[:,i+1])