diff scripts/plot/legend.m @ 7148:735086cfd405

[project @ 2007-11-09 18:01:44 by jwe]
author jwe
date Fri, 09 Nov 2007 18:01:45 +0000
parents 1c5b2b5b58ba
children 3422f39573b1 03dab4d76975
line wrap: on
line diff
--- a/scripts/plot/legend.m	Fri Nov 09 17:56:34 2007 +0000
+++ b/scripts/plot/legend.m	Fri Nov 09 18:01:45 2007 +0000
@@ -59,11 +59,11 @@
 ##
 ## Some specific functions are directly available using @var{func}:
 ##
-## @table @code
+## @table @asis
 ## @item "show"
 ##   Show legends from the plot
 ## @item "hide"
-## @itemx off
+## @itemx "off"
 ##   Hide legends from the plot
 ## @item "boxon"
 ##   Draw a box around legends
@@ -158,7 +158,9 @@
   if (nargs > 0)
     have_data = false;
     for i = 1:nkids
-      if (strcmp (get (kids(k), "type"), "line"))
+      if (strcmp (get (kids(k), "type"), "line")
+	  || strcmp (get (kids(k), "type"), "surface")
+	  || strcmp (get (kids(k), "type"), "patch"))
 	have_data = true;
 	break;
       endif
@@ -172,7 +174,10 @@
   for i = 1:nargs
     arg = varargin{i};
     if (ischar (arg))
-      while (k <= nkids && ! strcmp (get (kids(k), "type"), "line"))
+      while (k <= nkids
+	     && ! (strcmp (get (kids(k), "type"), "line")
+		   || strcmp (get (kids(k), "type"), "surface")
+		   || strcmp (get (kids(k), "type"), "patch")))
 	k++;
       endwhile
       if (k <= nkids)