Optimizing Plot Increments in MatLab for Direct Comparison - Tips and Tricks

  • Context: MATLAB 
  • Thread starter Thread starter babistopher
  • Start date Start date
  • Tags Tags
    Matlab Plots
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
babistopher
Messages
15
Reaction score
0
I am simply trying to find a way to set the plot increments to a set value. So I want the increments to be increasing by 10's (10, 20, 30, etc) and I want the physical distance between them to be the same on all plots (I do not really care what distance they are but they just all have to be the same). In case the latter didn't make sense, I simply want to be able to directly compare different plots and I do not want the scales to vary. So if one plot has, say, 1.5 cm between each axis point, then I want them to all have that. I hope that was clear! Thanks in advance
 
Physics news on Phys.org
Setting the plot increment is actually setting the independent variable. Assign values to your independent variable such that they are 10 apart. If ##x## is your independent variable,
Matlab:
x = 0:10:50;
That should do your work.
babistopher said:
I want the physical distance between them to be the same on all plo
People using Math Software generally never do any calculations by measuring a printed graph. Having said that, I believe it's not possible to do what you want. And why would you want to do that? Let Matlab set the axis, and do your computations over there itself. Don't do it by hand, it's not preferable. Graphs can easily be resized after taking a screenshot, and physical distances will vary.