I'm trying to create a simple scatter plot with metrics data I collect from my experiments. Each day, I test multiple experimental samples and the number of samples varies. I'm trying to create a scatter plot with the days as the x values, and all the experimental values collected on that day as the y values.
I've tried several approaches so far.
I'll spare the full code, but here is an example of what the data looks like:
XVals = ['10-Dec-18', '11-Dec-18']
YVals = [[0.88, 0.78, 0.92, 0.98, 0.91],[0.88, 0.78, 0.92, 0.98]]
Since pyplot wants x and y to be of the same dimension, I tried the following suggestion
for xe, ye in zip(XVals, YVals):
plt.scatter([xe] * len(ye), ye)
This gives me a value error since my xvals are strings.
ValueError: could not convert string to float: '10-Dec-18'
I have also tried generating the plot in the following fashion, but again I get an error message because x and y are of different dimensions:
fig, ax = plt.subplots()
ax.scatter(XVals, YVals)
plt.show()
This gives me the obvious error:
ValueError: x and y must be the same size
I haven't been able to find any examples of a similar plot (multiple Y values with categorical X values). Any help would be appreciated!