I have below data -
ProductName 01/01/2016 01/07/2016 01/14/2017
ABC 12 34 51
XYZ 9 76 12
PQR 12 23 7
DEF 54 4 34
I want to plot a timeseries scatterplot showing total sales on each day. I have created the following function -
def scatterplot(x_data, y_data, x_label, y_label, title):
_, ax = plt.subplots()
ax.scatter(x_data, y_data, s = 30, color = '#539caf', alpha = 0.75)
ax.set_title(title)
ax.set_xlabel(x_label)
ax.set_ylabel(y_label)
I am confused about how to call this function to get my desired result. The plot should show date on the x-axis and total sales on the y.