diff scripts/plot/__plt_get_axis_arg__.m @ 10995:e81914f3921f

Update legend code to support fltk (fixes #29348 and partially fixes #30461)
author David Bateman <dbateman@free.fr>
date Sat, 18 Sep 2010 22:30:41 +0200
parents 529b36293297
children fd0a3ac60b0e
line wrap: on
line diff
--- a/scripts/plot/__plt_get_axis_arg__.m
+++ b/scripts/plot/__plt_get_axis_arg__.m
@@ -40,7 +40,8 @@
       && varargin{1}(1) != 0 && ! isfigure (varargin{1}(1)))
     tmp = varargin{1};
     obj = get (tmp);
-    if (strcmp (obj.type, "axes") || strcmp (obj.type, "hggroup"))
+    if ((strcmp (obj.type, "axes") && ! strcmp (obj.tag, "legend")) 
+        || strcmp (obj.type, "hggroup"))
       h = ancestor (tmp, "axes");
       varargin(1) = [];
       if (isempty (varargin))