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)
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
Post a Comment