Change X & Y-Axis Scale in MATLAB

  • Context: MATLAB 
  • Thread starter Thread starter mathia
  • Start date Start date
  • Tags Tags
    Axis Matlab Scale
Click For Summary
SUMMARY

To ensure that the x-axis and y-axis in MATLAB are on the same scale, use the axis function with specific limits. For example, if the x-axis ranges from 0 to 80 and the y-axis ranges from -3 to 5, you can set the axis limits using axis([0 80 -3 5]). This command adjusts the plot to reflect equal scaling between both axes, allowing for accurate visual representation of data.

PREREQUISITES
  • Familiarity with MATLAB plotting functions
  • Understanding of axis scaling concepts
  • Basic knowledge of data visualization principles
  • Experience with MATLAB syntax and commands
NEXT STEPS
  • Explore MATLAB's axis equal command for equal scaling
  • Learn about MATLAB's xlim and ylim functions for setting axis limits
  • Investigate advanced plotting techniques in MATLAB, such as subplot and hold on
  • Research best practices for data visualization in MATLAB
USEFUL FOR

This discussion is beneficial for MATLAB users, data analysts, and researchers who need to create accurate and visually coherent plots in their data presentations.

mathia
Messages
15
Reaction score
0
Hi,
how can i change x and y-axis scale to make sure that x and y-axis are on the same scale in matlab?
my x-axis is from 0 80 but the y-axis is from -3 to 5, so in plot the axis are not the same but i want to have same scale on both axis.
Thank you.
 
Physics news on Phys.org
axis([xmin xmax ymin ymax])
 

Similar threads

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