# HG changeset patch # User Rik # Date 1315088627 25200 # Node ID 71ce008332e2cadaff40661eb4275b0720df1004 # Parent 7015842c65623e968466bb8dd9fa7a5a21f44f47 codesprint: Add demo block to gplot.m * gplot.m: Add demo block and mark function tested. diff --git a/scripts/sparse/gplot.m b/scripts/sparse/gplot.m --- a/scripts/sparse/gplot.m +++ b/scripts/sparse/gplot.m @@ -54,3 +54,31 @@ endif endfunction + + +%!demo +%! ## Binary Tree Representation +%! A = [0 1 0 0 0 0 0 +%! 1 0 1 1 0 0 0 +%! 0 1 0 0 0 0 0 +%! 0 1 0 0 1 0 0 +%! 0 0 0 1 0 1 1 +%! 0 0 0 0 1 0 0 +%! 0 0 0 0 1 0 0]; +%! +%! xy = [1, 0 +%! 1.5, 1 +%! 2, 0 +%! 2.5, 2 +%! 3.5, 1 +%! 3, 0 +%! 4, 0]; +%! +%! clf; +%! gplot (A, xy, "o-"); +%! set (get (gca, ("children")), "markersize", 12); +%! title ("gplot() of Binary Tree Adjacency matrix"); + +%% Mark graphical function as tested by demo block +%!assert (1); +