Discussion:
grid() not working in 3.0.0
(too old to reply)
Randy Yates
2008-04-19 01:44:14 UTC
Permalink
grid() does not accept two arguments. Thus, e.g.,

octave> grid("minor","on");

does not work.

Is there an update to 3.0.0?

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
--
% Randy Yates % "Though you ride on the wheels of tomorrow,
%% Fuquay-Varina, NC % you still wander the fields of your
%%% 919-577-9882 % sorrow."
%%%% <***@ieee.org> % '21st Century Man', *Time*, ELO
http://www.digitalsignallabs.com
david bateman
2008-04-19 21:07:51 UTC
Permalink
Post by Randy Yates
grid() does not accept two arguments. Thus, e.g.,
octave> grid("minor","on");
does not work.
This is not a documented feature of Matlab

http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/grid.html&http://www.google.fr/search?q=site%3Amathworks.com+grid&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

Does matlab accept a second argument to the grid function? If so send
a bug report to ***@octave.org where I'm sure this will be fixed. This
wouldn't be the first time that Matlab implements something else than
they document.

In any case the code

set(gca(),'XMinorGrid','on')

will do what you want and has the advantage of being compatible with
Matlab documented API.
Post by Randy Yates
Is there an update to 3.0.0?
A 3.0.1 release has been scheduled for "real soon now" for at least a
month.

D.
Randy Yates
2008-04-21 13:16:02 UTC
Permalink
Post by david bateman
Post by Randy Yates
grid() does not accept two arguments. Thus, e.g.,
octave> grid("minor","on");
does not work.
This is not a documented feature of Matlab
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/grid.html&http://www.google.fr/search?q=site%3Amathworks.com+grid&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
Does matlab accept a second argument to the grid function? If so send
wouldn't be the first time that Matlab implements something else than
they document.
Ensuring octave is compatible with matlab is, in my opinion, another
issue.

The issue I have is that 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.

See also: plot.

/usr/share/octave/3.0.0/m/plot/grid.m

Additional help for built-in functions and operators is
available in the on-line version of the manual. Use the command
`doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.octave.org and via the ***@octave.org
mailing list.
Post by david bateman
In any case the code
set(gca(),'XMinorGrid','on')
will do what you want and has the advantage of being compatible with
Matlab documented API.
Thanks! That works!
Post by david bateman
Post by Randy Yates
Is there an update to 3.0.0?
A 3.0.1 release has been scheduled for "real soon now" for at least a
month.
D.
NP. Thanks for your help, David.
--
% Randy Yates % "And all that I can do
%% Fuquay-Varina, NC % is say I'm sorry,
%%% 919-577-9882 % that's the way it goes..."
%%%% <***@ieee.org> % Getting To The Point', *Balance of Power*, ELO
http://www.digitalsignallabs.com
David Bateman
2008-04-23 19:03:17 UTC
Permalink
Post by Randy Yates
Post by david bateman
Post by Randy Yates
grid() does not accept two arguments. Thus, e.g.,
octave> grid("minor","on");
does not work.
This is not a documented feature of Matlab
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/grid.html&http://www.google.fr/search?q=site%3Amathworks.com+grid&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
Does matlab accept a second argument to the grid function? If so send
wouldn't be the first time that Matlab implements something else than
they document.
Ensuring octave is compatible with matlab is, in my opinion, another
issue.
The issue I have is that the octave grid() command does not operate as
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.
See also: plot.
/usr/share/octave/3.0.0/m/plot/grid.m
Additional help for built-in functions and operators is
available in the on-line version of the manual. Use the command
`doc <topic>' to search the manual index.
Help and information about Octave is also available on the WWW
mailing list.
Ok, then its either a bug in grid or its documentation.. Can you file a
bug report at ***@octave.org

D.
Randy Yates
2008-04-23 21:15:12 UTC
Permalink
Post by David Bateman
Ok, then its either a bug in grid or its documentation.. Can you file a
Yes - done.
--
% Randy Yates % "She's sweet on Wagner-I think she'd die for Beethoven.
%% Fuquay-Varina, NC % She love the way Puccini lays down a tune, and
%%% 919-577-9882 % Verdi's always creepin' from her room."
%%%% <***@ieee.org> % "Rockaria", *A New World Record*, ELO
http://www.digitalsignallabs.com
Continue reading on narkive:
Loading...