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 diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -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
+++ 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)