Global Index (short | long) | Local contents | Local Index (short | long)
axis_limits(num)
axis_limits(num) num = 30 is default This function squeezes the current axis so the data fits in the current axis (using axis image). It then resets the axis limits to allow a little space around the image.
function axis_limits(num) if nargin == 0; num = 30; end; axis image lims = axis; dx = diff(lims(1:2))/num; dy = diff(lims(3:4))/num; dax = dx+dy; axis([lims(1)-dax lims(2)+dax lims(3)-dax lims(4)+dax]);