Mercurial > hg > octave-nkf
diff scripts/plot/draw/line.m @ 19075:a8cacb2e98da
line.m: Add new %!demo of different linestyles.
* line.m: Add new %!demo of different linestyles.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 01 Jul 2014 09:41:50 -0700 |
parents | 87c3848cf3c0 |
children | 4197fc428c7d |
line wrap: on
line diff
--- a/scripts/plot/draw/line.m +++ b/scripts/plot/draw/line.m @@ -64,6 +64,16 @@ %!demo %! clf +%! line ([0 1], [0.8 0.8], 'linestyle', '-', 'color', 'b'); +%! line ([0 1], [0.6 0.6], 'linestyle', '--', 'color', 'g'); +%! line ([0 1], [0.4 0.4], 'linestyle', ':', 'color', 'r'); +%! line ([0 1], [0.2 0.2], 'linestyle', '-.', 'color', 'k'); +%! ylim ([0 1]); +%! title ('line() with various linestyles'); +%! legend ('"-"', '"--"', '":"', '"-."', 'location', 'eastoutside'); + +%!demo +%! clf %! x = 0:0.3:10; %! y1 = cos (x); %! y2 = sin (x);