Plotting problems 3.1.51+

Ben Abbott bpabbott at mac.com
Tue Sep 30 19:14:50 CDT 2008


On Sep 30, 2008, at 6:44 PM, Michael D. Godfrey wrote:

> 1. The grid command does not allow a second argument when the
>   first argument is "minor".  Looking at grid.m, this is a simple
>   problem, but there are choices about how to fix it.  Since
>   grid("minor") does toggle the minor grid lines as the documentation
>   says, one fix would be to change the documentation by eliminating
>   the description of the grid("minor", "on" | "off") capability.
>   Otherwise, simple change to the code will implement this.

Matlab does not document the second argument. So I'd say the doc- 
string should be corrected.

However, Matlab does allow

	grid (hax, 'minor')

where the grid in the axis the handle "hax" points to is changed.  
Octave's current sources do not respect this behavior.

For compatibility

	grid on			: turns grid on
	grid off			: turns grid off
	grid				: toggles grid
	grid minor		: toggles minor grid
	grid (hax, ...)		: performs subsequent command in axis "hax"

Ben


More information about the Bug-octave mailing list