import matplotlib.pyplot as plt
x = [2.4, 3.2, 4.435, 5.65, 6.4, 7.333, 8.5, 9.2345]
y = [1.4356, "", 5.32245, 6.542, 7.567, .77558, "", ""]
y1 = []
for string in (y):
if (string != ""):
y1.append(string)
plt.plot(x, y1, 'b.', label="Sample data")
plt.show()
When I try to plot this I get Value Error "x and y must have same first dimension, but have shapes (8,) and (5,)"
I want to skip over these empty elements and plot just the 5 points but I don't know how to go about it.
"(quote) so you change the size of the arraynp.nan->from numpy as np