Mercurial > hg > octave-nkf
diff scripts/plot/patch.m @ 13115:cd808de114c1
Allow surface and patch to be called w/o arguments. Adding and fixing tests.
plot/line.m: Style fixes and test added.
plot/patch.m: Tests added.
plot/surface.m: Allow surface to be called w/o arguments. Tests added.
plot/private/__patch__.m: Allow patch to be called w/o arguments.
author | Kai Habel <kai.habel@gmx.de> |
---|---|
date | Thu, 08 Sep 2011 15:43:40 +0200 |
parents | 35f6e9a25296 |
children | 2ea1658ad049 |
line wrap: on
line diff
--- a/scripts/plot/patch.m +++ b/scripts/plot/patch.m @@ -152,3 +152,23 @@ %! 'FaceVertexCData', jet(5), 'FaceColor', 'interp') %! view (-37.5, 30) +%!test +%! hf = figure (1232, "visible", "off"); +%! unwind_protect +%! h = patch; +%! assert (findobj (hf, "type", "patch"), h); +%! assert (get (h, "xdata"), [0; 1; 1], eps); +%! assert (get (h, "ydata"), [0; 0; 1], eps); +%! assert (isempty(get (h, "zdata"))); +%! assert (isempty(get (h, "cdata"))); +%! assert (get (h, "faces"), [1, 2, 3], eps); +%! assert (get (h, "vertices"), [0 0; 1 0; 1 1], eps); +%! assert (get (h, "type"), "patch"); +%! assert (get (h, "facecolor"), [0 0 1]); +%! assert (get (h, "linestyle"), get (0, "defaultpatchlinestyle")); +%! assert (get (h, "linewidth"), get (0, "defaultpatchlinewidth"), eps); +%! assert (get (h, "marker"), get (0, "defaultpatchmarker")); +%! assert (get (h, "markersize"), get (0, "defaultpatchmarkersize")); +%! unwind_protect_cleanup +%! close (hf); +%! end_unwind_protect