How can I change the x and y-axis limits in Matlab to arbitrary scales?

  • Topic: MATLAB 
  • Thread starter Thread starter Kidphysics
  • Start date Start date
  • Tags Tags
    Axis Matlab
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
3 replies · 4K views
Kidphysics
Messages
164
Reaction score
0
Hello, I have an image which gets displayed and has the x and y-axis ranging from 0-812 and 0-607 respectively. This is because these are the pixel sizes for my image. I would like to change the x-axis to show -3.85, 3.85 and for the y-axis to show -2.9,2.9. However, when I load my image into the figure and go into the property editor Matlab believes I am typing in the range of pixels still. I would just like to scale my image with these arbitrary scales. Please help!
 
Physics news on Phys.org
axis([XMIN XMAX YMIN YMAX]) sets scaling for the x- and y-axes on the current plot.

Type 'help axis' or 'doc axis' for more info.
 
kreil said:
axis([XMIN XMAX YMIN YMAX]) sets scaling for the x- and y-axes on the current plot.

Type 'help axis' or 'doc axis' for more info.

this gave me the same problem. it did not scale the image it simple moved the image window to this location.