# HG changeset patch # User Ben Abbott # Date 1330207604 18000 # Node ID b9630dfc4fd93437118f39397171c0065ba9374f # Parent f3c958ae393d68745cbdd54f46839bda7788e2e9 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. diff --git a/scripts/plot/mesh.m b/scripts/plot/mesh.m --- 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 +