I have a set of data, x is time(in second), y is height. y goes up and down, with some peaks (period varies). I am only interested in y around the peaks, so deleted other data. The remained x (time) value unchanged. I end up with x has value like 20, 21,..., 40, then jump over a large time frame e.g. 2000, continue with 2001, 2002,...,2050, then jump over another e.g.5000, continue with 5001, 5002, ..., 5030. the last x value is 60000 (for example).
If I still use plt.plot(x,y), the x axis is evenly spread out from 20 to 60000 (based on value of x). I need x axis to be evenly spread out based on how many data points in x. plt.plot(y) does that but doesn't mark the x's value on the x axis, which is essential for my plotting.