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
Click For Summary
SUMMARY

This discussion focuses on optimizing plot increments in MATLAB for direct comparison across multiple plots. Users can set the independent variable increments by defining values such as x = 0:10:50; to achieve consistent spacing of 10 units. However, achieving uniform physical distances between axis points across different plots is not feasible, as MATLAB automatically adjusts axis scaling based on data. The consensus is to rely on MATLAB's automatic settings rather than manually adjusting physical distances.

PREREQUISITES
  • Familiarity with MATLAB programming and syntax
  • Understanding of independent and dependent variables in plotting
  • Knowledge of MATLAB's axis properties and scaling
  • Basic graphing concepts and visualization techniques
NEXT STEPS
  • Explore MATLAB's axis properties to understand automatic scaling
  • Learn about MATLAB's set(gca,...) function for customizing plots
  • Research techniques for exporting MATLAB plots with consistent dimensions
  • Investigate MATLAB's plotting functions for advanced visualization options
USEFUL FOR

This discussion is beneficial for MATLAB users, data analysts, and researchers who require precise control over plot increments and visual consistency in graphical representations.

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.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
5K
Replies
2
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K