I cannot figure out how to satisfy this issue to resolve the ValueError: x and y must have same first dimension.
This is the relevant code:
for i in range( 0, time + 1 ):
outflow = constant * quantity
quantityChange = inflow - outflow
changeList.append( quantityChange )
print "%2d %9.2f %11.3f %11.3f %10.3f" % ( i, inflow, quantity, outflow, quantityChange )
quantity += quantityChange
# Plot on graph
x = np.arange( time )
y = np.arange( quantityChange )
plt.plot( x, y, label="rate of change" )
plt.ylabel( "Quantity" )
plt.xlabel( "Time" )
I have picked up that neither a 'list' or an 'int' are iterable objects, but I am stymied by how I can successfully get the x and y axes to portray the data outputs.
Also, what does that error message mean? That the starting point must be 0 or of the same object type? I haven't found a clear answer in the tutorial pages yet, but I will perservere.