I want to plot Points with x and y-Values and colour them depending on a corresponding time value. Data is stored in a Dataframe.
The solution should be the c-parameter of matplotlib's scatter function, but for some reason its not working for me.
The times-column is a List of float values between 0 and 3.
Plotting the Points without c-parameter is working.
import matplotlib.pyplot as plt
c=list(df_result_local['times'])
for i in range(len(df_result_local['Points'])):
plt.scatter(df_result_local['Points'][i].x, df_result_local['Points'][i].y, c=c, alpha = 0.5)
Here I get a ValueError: 'c' argument has 1698 elements, which is not acceptable for use with 'x' with size 1, 'y' with size 1.