[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
figure bug
From: |
Daniel J Sebald |
Subject: |
figure bug |
Date: |
Mon, 12 Feb 2007 04:05:14 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 |
figure ('visible', 'off');
should produce an error, which it does. (At least I think it should, unless a
new figure is supposed to be created and then its parameter set.) But it isn't
a correct kind of error.
octave:8> figure ('visible', 'off');
error: `f' undefined near line 56 column 12
error: evaluating argument list element number 1
error: evaluating if command near line 55, column 5
error: evaluating if command near line 54, column 3
error: called from `figure' in file
`/usr/local/share/octave/2.9.9+/m/plot/figure.m'
The attached patch should be incrementally better. (Not sure what function
variable convention is.)
Dan
--- /usr/local/share/octave/2.9.9+/m/plot/figure.m 2007-02-08
11:50:56.000000000 -0600
+++ figure.m 2007-02-12 04:02:17.000000000 -0600
@@ -18,7 +18,7 @@
## 02110-1301, USA.
## -*- texinfo -*-
-## @deftypefn {Function File} {} figure (@var{n})
+## @deftypefn {Function File} {} figure
(@var{n},@var{"param1"},@var{"setting1"},...)
## Set the current plot window to plot window @var{n}. If @var{n} is
## not specified, the next available window number is chosen.
## @end deftypefn
@@ -45,6 +45,8 @@
else
error ("figure: expecting figure handle or figure number");
endif
+ else
+ print_usage();
endif
if (nargout > 0)
- figure bug,
Daniel J Sebald <=