Mercurial > hg > octave-lyh
changeset 14252:4e6436a60b62
Changes to allow plot demos to be run under Matlab.
* hold.m, legend.m
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sun, 22 Jan 2012 17:56:46 -0500 |
parents | 27abe77158d6 |
children | f9bd63f5ddd0 |
files | scripts/plot/hold.m scripts/plot/legend.m |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/hold.m +++ b/scripts/plot/hold.m @@ -136,7 +136,7 @@ %! z = peaks (x, y); %! contourf (x, y, z, 10); %! hold on; -%! plot (vec (x), vec (y), '^'); +%! plot (x(:), y(:), '^'); %! patch ([-1.0 1.0 1.0 -1.0 -1.0], [-1.0 -1.0 1.0 1.0 -1.0], 'red'); %! xlim ([-2.0 2.0]); %! ylim ([-2.0 2.0]);
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -1037,7 +1037,7 @@ %! for i = 1:5 %! h = plot (1:100, i + rand(100,1)); hold on; %! set (h, 'color', colororder(i,:)); -%! labels = {labels{:}, cstrcat('Signal ', num2str (i))}; +%! labels = {labels{:}, ['Signal ', num2str(i)]}; %! end %! hold off; %! title ('Signals with random offset and uniform noise'); @@ -1052,7 +1052,7 @@ %! for i = 1:5 %! h = plot (1:100, i + rand (100,1)); hold on; %! set (h, 'color', colororder(i,:)); -%! labels = {labels{:}, cstrcat('Signal ', num2str (i))}; +%! labels = {labels{:}, ['Signal ', num2str(i)]}; %! end %! hold off; %! title ('Signals with random offset and uniform noise');