diff scripts/plot/plotyy.m @ 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 be9b14945774
children a013ff655ca4
line wrap: on
line diff
--- a/scripts/plot/plotyy.m
+++ b/scripts/plot/plotyy.m
@@ -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)