--- scripts/plot/axis.m.orig 2009-03-09 10:05:36.000000000 +0100 +++ scripts/plot/axis.m 2009-03-09 15:23:57.000000000 +0100 @@ -158,8 +158,12 @@ elseif (strcmpi (ax, "image")) set (ca, "dataaspectratio", [1, 1, 1]); __do_tight_option__ (ca); - elseif (strcmpi (ax, "equal") || strcmpi (ax, "square")) + elseif (strcmpi (ax, "equal")) set (ca, "dataaspectratio", [1, 1, 1]); + elseif (strcmp (ax, "square")) + x = xlim; + y = ylim; + set (ca, "dataaspectratio", [y(2)-y(1),x(2)-x(1), 1]); elseif (strcmpi (ax, "normal")) set (ca, "dataaspectratiomode", "auto"); @@ -306,17 +310,17 @@ %!demo %! t=0:0.01:2*pi; x=sin(t); %! -%! subplot(221); title("normal plot"); -%! plot(t, x); +%! subplot(221); plot(t, x); +%! title("normal plot"); %! -%! subplot(222); title("square plot"); -%! axis("square"); plot(t, x); +%! subplot(222); plot(t, x); +%! title("square plot"); axis("square"); %! -%! subplot(223); title("equal plot"); -%! axis("equal"); plot(t, x); +%! subplot(223); plot(t, x); +%! title("equal plot"); axis("equal"); %! -%! subplot(224); title("normal plot again"); -%! axis("normal"); plot(t, x); +%! subplot(224); plot(t, x); +%! title("normal plot again"); axis("normal"); %!demo %! t=0:0.01:2*pi; x=sin(t);