Mercurial > hg > octave-nkf
comparison scripts/plot/draw/mesh.m @ 19114:9a5e03801d23
Update some plot %!demos so that they run under Matlab.
* datetick.m: Explicitly name 'x' axis in call to datetick.
* mesh.m: Use try/catch around block checking __graphics_toolkit__
which is an Octave-only figure property.
* patch.m: Call patch with X,Y,C rather than X,Y,PROP,VAL which is not
supported by Matlab.
* ezplot3: Use explicit call to legend, rather than ';legend;' in ezplot3
call which is Octave-only syntax.
* rose.m: Add a demo that Matlab can run. Matlab won't run the second demo
which uses Octave-only syntax.
* copyobj.m: Don't use errorbar plot style argument which is Octave-only
syntax.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 14 Jul 2014 21:40:28 -0700 |
parents | 4d75bda5df80 |
children | 4197fc428c7d |
comparison
equal
deleted
inserted
replaced
19111:d0d0858cfab1 | 19114:9a5e03801d23 |
---|---|
124 %! set (gca, 'zscale', 'log'); | 124 %! set (gca, 'zscale', 'log'); |
125 %! xlabel 'X-axis'; | 125 %! xlabel 'X-axis'; |
126 %! ylabel 'Y-axis'; | 126 %! ylabel 'Y-axis'; |
127 %! zlabel 'log scale'; | 127 %! zlabel 'log scale'; |
128 %! title ({'mesh() with color proportional to Z^2', 'Z-axis is log scale'}); | 128 %! title ({'mesh() with color proportional to Z^2', 'Z-axis is log scale'}); |
129 %! if (strcmp (get (gcf, '__graphics_toolkit__'), 'gnuplot')) | 129 %! try |
130 %! title ({'Gnuplot: mesh color is wrong', 'This is a Gnuplot bug'}); | 130 %! if (strcmp (get (gcf, '__graphics_toolkit__'), 'gnuplot')) |
131 %! endif | 131 %! title ({'Gnuplot: mesh color is wrong', 'This is a Gnuplot bug'}); |
132 %! endif | |
133 %! catch | |
134 %! end | |
132 | 135 |
133 %!demo | 136 %!demo |
134 %! clf; | 137 %! clf; |
135 %! x = logspace (0,1,11); | 138 %! x = logspace (0,1,11); |
136 %! z = x'*x; | 139 %! z = x'*x; |