I have the following code:
xx = np.arange(len(days[0]))
ys = [i+xx+(i*xx)**2 for i in range(len(days[0]))]
colors = cm.rainbow(np.linspace(0, 1, len(ys)))
for d,cc in zip(days[0],colors):
ax.scatter(t,p,d,color=cc)
t and p are lists (time and price) and d is an integer (day). When I run the code the result I get is below :
The issue is that the axis are wrong. p and d need to be swapped but when I try to do:
ax.scatter(t,d,p)
I get an error saying "Arguments xs and ys must be of same size". Is there any way I can just get the axis to be switched since intuitively the plot does not make sense in this configuration.
The reason that the days are iterated over is so that I can have a separate color for each day on the plot.
I tried the solution of iterating through the t and p lists for each day and just plotting individual corresponding t,d,p points, However that is much slower and afterwards the matplotlib plot is unresponsive if you try to move it.


