0
votes

I am plotting a time graph, where the values are my data and indexes are my time index. Now my x-axis is shown as index right now, looks like 0, 1, 2, 3, 4 but I wish to map it my to my time vector with something like

time(index) %output would look like 2012, 1995 etc

so how can I "normalize" my x-axis?

thanks

1
Can you give an example to the possible values of index and time? why not simply use plot(time,data)? - Itamar Katz

1 Answers

0
votes

If your data is contained in the vector data and index are the indices you want to visualize:

plot(time(index), data(index))

will do. This is also explained in the MATLAB help for plot.