plot - How to change the range of my x-axis in matplotlib -


i trying plot list of 30.000 values. name of list "velocity_x". plot them following command:

plot(velocity_x,'r') 

the result shown in image below (do not pay attention dashed line)

image

since using command line, creates automatically x-axis of length 30.000. changing range of x-axis in such way show time(s) instead of iterations t = 0.0002 * iteration.

you use linspace:

a=np.linspace(0,6,len(velocity_x)) plot(a, velocity_x, 'r' ) 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -