Mercurial > hg > octave-lyh
changeset 17457:9e1ef7d2d21c
contour3.m: Turn off axis box for compatibility with Matlab.
* scripts/plot/contour3.m: Turn off axis "box" property.
Use cool colormap in %!demo code to see things more clearly.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 19 Sep 2013 15:21:11 -0700 |
parents | 93d2239b7fe9 |
children | 43e0b711d7e0 |
files | scripts/plot/contour3.m |
diffstat | 1 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/contour3.m +++ b/scripts/plot/contour3.m @@ -52,9 +52,9 @@ ## @example ## @group ## contour3 (peaks (19)); +## colormap cool; ## hold on; -## surface (peaks (19), "facecolor", "none", "EdgeColor", "black"); -## colormap hot; +## surf (peaks (19), "facecolor", "none", "edgecolor", "black"); ## @end group ## @end example ## @@ -80,7 +80,7 @@ end_unwind_protect if (! ishold ()) - set (hax, "view", [-37.5, 30], + set (hax, "view", [-37.5, 30], "box", "off", "xgrid", "on", "ygrid", "on", "zgrid", "on"); endif @@ -94,14 +94,13 @@ %!demo %! clf; -%! contour3 (peaks (19)); +%! colormap (cool (64)); +%! surf (peaks (19), 'facecolor', 'none', 'edgecolor', [0.85 0.85 0.85]); %! hold on; -%! surf (peaks (19), 'facecolor', 'none', 'edgecolor', [0.8 0.8 0.8]); -%! colormap (hot (64)); +%! contour3 (peaks (19)); +%! hold off; %! axis tight; %! zlim auto; -%! box off; %! view (315, 17); -%! title ('contour3 of peaks() function'); -%! hold off; +%! title ({'contour3 of peaks() function', 'gray surf() shows peaks function'});