changeset 6272:a1f3d3b7ee5c

[project @ 2007-02-06 02:09:48 by jwe]
author jwe
date Tue, 06 Feb 2007 02:09:48 +0000
parents 6fab59e81b4e
children de81db175325
files scripts/ChangeLog scripts/plot/legend.m scripts/plot/print.m
diffstat 3 files changed, 20 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Tue Feb 06 01:36:47 2007 +0000
+++ b/scripts/ChangeLog	Tue Feb 06 02:09:48 2007 +0000
@@ -1,3 +1,11 @@
+2007-02-05  Rafael Laboissiere  <rafael@debian.org>
+
+	* plot/print.m: Avoid error message from cellidx.
+
+2007-02-05  John W. Eaton  <jwe@octave.org>
+
+	* plot/legend.m: Fix check for data.
+
 2007-02-05  Thomas Treichl  <Thomas.Treichl@gmx.net>
 
 	* plot/__uiobject_draw_axes__.m (do_linestyle_command):
--- a/scripts/plot/legend.m	Tue Feb 06 01:36:47 2007 +0000
+++ b/scripts/plot/legend.m	Tue Feb 06 02:09:48 2007 +0000
@@ -138,8 +138,17 @@
     endif
   endif
 
-  if (nargs > 0 && isempty (__plot_data__{cf}{mxi,myi}))
-    warning ("legend: plot data is empty; setting key labels has no effect");
+  if (nargs > 0)
+    have_data = false;
+    for i = 1:nkids
+      if (strcmp (get (kids(k), "type"), "line"))
+	have_data = true;
+	break;
+      endif
+    endfor
+    if (! have_data)
+      warning ("legend: plot data is empty; setting key labels has no effect");
+    endif
   endif
 
   for i = 1:nargs
--- a/scripts/plot/print.m	Tue Feb 06 01:36:47 2007 +0000
+++ b/scripts/plot/print.m	Tue Feb 06 02:09:48 2007 +0000
@@ -178,7 +178,7 @@
   dev_list = {"aifm" "corel" "fig" "png" "pbm" "dxf" "mf" "hpgl", ...
 	      "ps" "ps2" "psc" "psc2" "eps" "eps2" "epsc" "epsc2" "emf"};
   convertname = "";
-  idx = cellidx (dev_list, dev);
+  [idx, errmsg] = cellidx (dev_list, dev);
   if (! idx)
     if (! isempty (devopt))
       convertname = strcat (devopt, ":", name);