materias = ["MAT 1","MAT 2","MAT 3","FIS 1","FIS 2","FIS 3","QUI 1","QUI 2","GEO 1","GEO 2","PORT","RED","LIT","ART","ING","HIST 1","HIST 2","FIL","SOC","EDF","BIO 1","BIO 2","BIO 3"
]
for i in materias:
note= str(i)
file_name = 'images/' + str(i) +'.png'
print(i,":")
plt.plot(df["PROVAS"], df[i], label=note)
plt.legend()
plt.savefig(file_name)
plt.show()
我不知道如何合并所有这些图表,也不知道如何给予它们不同的颜色(以更好的可视化)(抱歉我的英语不好)
1条答案
按热度按时间a6b3iqyw1#
只需将
c=(R, G, B)
添加到plot()
调用中,其中R
、G
和B
是介于0和1之间的值。例如,
将使线变为绿色。对于您的示例,您可以跟踪索引,并在浏览材料列表时浏览颜色列表。