changeset 8769:a186c5b4f264

plotyy.m: handle existing figure with no axes
author John W. Eaton <jwe@octave.org>
date Tue, 17 Feb 2009 00:01:33 -0500
parents e0fbf17a17bb
children af676d09da08
files scripts/ChangeLog scripts/plot/plotyy.m
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Feb 16 17:01:17 2009 -0500
+++ b/scripts/ChangeLog	Tue Feb 17 00:01:33 2009 -0500
@@ -1,3 +1,7 @@
+2009-02-17  John W. Eaton  <jwe@octave.org>
+
+	* plot/plotyy.m: Handle case of existing figure with no axes.
+
 2009-02-16  John W. Eaton  <jwe@octave.org>
 
 	* help/__makeinfo__.m: Rename from help/makeinfo.m.  Delete tmp file.
--- a/scripts/plot/plotyy.m	Mon Feb 16 17:01:17 2009 -0500
+++ b/scripts/plot/plotyy.m	Tue Feb 17 00:01:33 2009 -0500
@@ -84,6 +84,9 @@
 	ax = ax(1:2);
       elseif (length (ax) == 1)
         ax(2) = axes ();
+      elseif (isempty (ax))
+	ax(1) = axes ();
+	ax(2) = axes ();
       endif
     endif
     if (nargin < 2)