Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab: varying the x,y axis

  1. Jun 12, 2013 #1
    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!
     
  2. jcsd
  3. Jun 12, 2013 #2

    kreil

    User Avatar
    Gold Member

    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.
     
  4. Jun 12, 2013 #3
    this gave me the same problem. it did not scale the image it simple moved the image window to this location.
     
  5. Jun 12, 2013 #4

    kreil

    User Avatar
    Gold Member

    B = imresize(A, scale) returns image B that is scale times the size of A.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook