Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Assuming that your axes handle is <code>hAxes</code>, then you can do the zooming by changing the <code>xLim</code> and <code>yLim</code> properties of your axes rather than a zooming ratio, like the following:</p> <p>If your plot is using the x axis from 0-100 then you can zoom in on a particular sub range og 0-100 for example:</p> <pre><code>set(hAxes,'xLim',[20 40]) </code></pre> <p>and also for y axis you can zoom on a specific y range:</p> <pre><code>set(hAxes,'xLim',[30 70]) </code></pre> <p>and if you want to zoom on a specific area on the plot, for example x[20-50],y[10-50], you can do it by doing the two previous action like:</p> <pre><code>set(hAxes,'xLim',[20 50]) set(hAxes,'yLim',[10 50]) </code></pre> <p><br> <strong>So</strong>, change the <code>xLim</code> and <code>yLim</code> values of the axe depending on the size of your plot or your image, and that's how actually zooming work with axes.</p> <p>You can even try this demo script:</p> <pre><code> clear;clc; figure; h = axes; y = sin( 0:2*pi / 100:pi ); plot(y); %// ============================= pause(1); set(h , 'xlim' , [20 80]); %// ============================= pause(1); set(h , 'xlim' , [30 40]); %// ============================= pause(1); set(h , 'xlim' , [10 100]); %// ============================= pause(1); set(h , 'ylim' , [.1 .4]); %// ============================= pause(1); set(h , 'ylim' , [.2 .7]); %// ============================= pause(1); set(h , 'ylim' , [.3 .9]); %// ============================= pause(1); set(h , 'ylim' , [.1 .2]); set(h , 'xlim' , [10 80]); %// ============================= pause(1); set(h , 'ylim' , [.3 .7]); set(h , 'xlim' , [40 90]); %// ============================= </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload