Mercurial > hg > octave-nkf
changeset 14411:b9630dfc4fd9
Add mesh() demos.
* mesh.m: Add demos for linear and log zscale. The log scale demo reveals a
bug present in Gnuplot 4.4.x.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 25 Feb 2012 17:06:44 -0500 |
parents | f3c958ae393d |
children | c4a2eac243b4 |
files | scripts/plot/mesh.m |
diffstat | 1 files changed, 24 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/mesh.m +++ b/scripts/plot/mesh.m @@ -63,5 +63,28 @@ endfunction -%% FIXME: Need demo or test for function +%!demo +%! clf (); +%! x = logspace(0,1,11); +%! z = x'*x; +%! mesh (x, x, z, z.^2); +%! xlabel xlabel +%! ylabel ylabel +%! zlabel "linear scale" +%! if (strcmp (get (gcf, "__graphics_toolkit__"), "gnuplot")) +%! title ("Gnuplot's mesh color is correct") +%! endif +%!demo +%! clf (); +%! x = logspace(0,1,11); +%! z = x'*x; +%! mesh (x, x, z, z.^2); +%! set (gca, "zscale", "log") +%! xlabel xlabel +%! ylabel ylabel +%! zlabel "log scale" +%! if (strcmp (get (gcf, "__graphics_toolkit__"), "gnuplot")) +%! title ({"Gnuplot's mesh color is wrong", "This a Gnuplot bug"}) +%! endif +