How do I rescale the X axis in MATLAB's plot function? [duplicate]
Possible Duplicate:
Changing scaling of MATLAB Figure
I have an m-size vector开发者_Go百科 f. By calling plot(f)
MATLAB plots a graph of x=1..m as a function of f:
I would still like a graph of f as a function of 1..m, but I want the numbers on the x axis to be 5,15,25,...,95 (fake_x = 5:10:95
).
In other words: I want the graph to be exactly the same (f as a function of x=1..m), but the x axis should be fake_x
, not x.
set(gca,'XTick',[5 15 25 35 45 55 65 75 85 95])
Or something like this.
look up "tick" in the help documentation. the set(gca... function is very helpful in customizing plots.
hope this helps
精彩评论