Mercurial > hg > octave-avbm
changeset 11161:2e32236eaa90
Add demos setting both data and plotbox aspect ratios.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Thu, 28 Oct 2010 13:22:49 +0800 |
parents | 131d56b6d9a3 |
children | a981e2f56ec1 |
files | scripts/ChangeLog scripts/plot/daspect.m scripts/plot/pbaspect.m |
diffstat | 3 files changed, 23 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-10-28 Ben Abbott <bpabbott@mac.com> + + * plot/daspect.m, plot/pbaspect.m: Add demos setting both data and + plotbox aspect ratios. + 2010-10-27 David Bateman <dbateman@free.fr> * plot/private/__patch__.m (setdata, setvertexdata): If argments are
--- a/scripts/plot/daspect.m +++ b/scripts/plot/daspect.m @@ -104,6 +104,14 @@ %! x = 0:0.01:4; %! clf %! plot (x, cos (x), x, sin (x)) +%! daspect ([1 1 1]) +%! pbaspect ([2 1 1]) +%! title ("2x1 plot box with axis limits [0, 4, -2, 2]") + +%!demo +%! x = 0:0.01:4; +%! clf +%! plot (x, cos (x), x, sin (x)) %! axis square %! set (gca, "activepositionproperty", "position") %! daspect ([1 1 1])
--- a/scripts/plot/pbaspect.m +++ b/scripts/plot/pbaspect.m @@ -89,12 +89,20 @@ %! clf %! plot (x, cos (x), x, sin (x)) %! pbaspect ([1 1 1]) -%! title ('plot box should be square') +%! title ("plot box should be square") %!demo %! x = 0:0.01:4; %! clf %! plot (x, cos (x), x, sin (x)) %! pbaspect ([2 1 1]) -%! title ('plot box aspect ratio should be 2x1') +%! title ("plot box aspect ratio should be 2x1") +%!demo +%! x = 0:0.01:4; +%! clf +%! plot (x, cos (x), x, sin (x)) +%! daspect ([1 1 1]) +%! pbaspect ([2 1 1]) +%! title ("plot box should be 2x1, and axes [0 4 -1 1]") +