grid() doesn't work as documentation states

Randy Yates yates at ieee.org
Wed Apr 23 16:14:28 CDT 2008


The octave grid() command does not operate as
the help says it should:

  octave:4> help grid
   -- Function File:  grid (ARG)
   -- Function File:  grid ("minor", ARG2)
       Force the display of a grid on the plot.  The argument may be
       either `"on"' or `"off"'.  If it is omitted, the current grid
       state is toggled.
  
       If ARG is `"minor"' then the minor grid is toggled.  When using a
       minor grid a second argument ARG2 is allowed, which can be either
       `"on"' or `"off"' to explicitly set the state of the minor grid.

I peeked inside the grid.m file and it exits with a usage error when the
number of arguments exceeds one, so the second form of the command (with
two arguments) can never work. 

In my opinion, you should change the documentation, not the command,
since Matlab's grid() command doesn't have the second option (according
to Bateman).

This is octave 3.0.0 running under

Linux localhost.localdomain 2.6.24.4-64.fc8 #1 SMP Sat Mar 29 09:15:49 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

(Fedora 8) installed using the yum/rpm package.
-- 
%  Randy Yates                  % "She has an IQ of 1001, she has a jumpsuit
%% Fuquay-Varina, NC            %            on, and she's also a telephone."
%%% 919-577-9882                % 
%%%% <yates at ieee.org>           %        'Yours Truly, 2095', *Time*, ELO   
http://www.digitalsignallabs.com


More information about the Bug-octave mailing list