グラフ用にこの関数を取得しました。グラフが (0,0) から始まるように軸をフォーマットしたいです。また、どの行が y1 に属し、どの行が y2 に属し、軸にラベルを付けることができるように、凡例をどのように書きますか。
import matplotlib.pyplot as plt
def graph_cust(cust_type):
"""function produces a graph of day agaist customer number for a given customer type"""
s = show_all_states_list(cust_type)
x = list(i['day']for i in s)
y1 = list(i['custtypeA_nondp'] for i in s)
y2 = list(i['custtypeA_dp']for i in s)
plt.scatter(x,y1,color= 'k')
plt.scatter(x,y2,color='g')
plt.show()
ありがとう