Plot data points
Title
Question
l = [0,1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]
t = [0.69, 0.90, 1.19, 1.30, 1.47, 1.58, 1.77, 1.83, 1.94]
tsquare = square(t)
tsquare
plot(l, tsquare, ".")
I am getting an error -
In [16]: plot(l, tsquare, ".")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-16-91fb2daa7489> in <module>
----> 1 plot(l, tsquare, ".")
ValueError: x and y must have same first dimension, but have shapes (10,) and (9,)
Can you please check the error ?
Python-3.4.3 Plotting-Data 03-04 min 10-20 sec
Answers:
try to use single quotes ' ' in the plot command or rewatch the video again.
Login to add comment