From bug-octave-request at bevo dot che dot wisc dot edu Thu Nov 16 11:56:05 2000 Subject: contour parameter order From: "John W. Eaton" To: Paul Kienzle Cc: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 16 Nov 2000 11:43:03 -0600 On 14-Nov-2000, Paul Kienzle wrote: | To: bug-octave at bevo dot che dot wisc dot edu | Cc: pkienzle | Subject: contour parameter order | | Bug report for Octave 2.1.31 configured for %OCTAVE_CANONICAL_HOST_TYPE% | | Description: | ----------- | | The order of parameters for plot/contour.m differs from that in matlab | To make it the same, it must be changed from contour(z,n,x,y) to | contour(x,y,z,n). OK, I applied this patch. I suppose some people will complain about the incompatibility with previous versions of Octave. Hmm. jwe | *** scripts/plot/contour.m 2000/11/14 13:33:54 1.1 | --- scripts/plot/contour.m 2000/11/14 13:44:10 | *************** | *** 18,24 **** | ## 02111-1307, USA. | | ## -*- texinfo -*- | ! ## at deftypefn {Function File} {} contour (@var{z}, @var{n}, @var{x}, @var{y}) | ## Make a contour plot of the three-dimensional surface described by | ## at var{z} dot Someone needs to improve @code{gnuplot}'s contour routines | ## before this will be very useful. | --- 18,25 ---- | ## 02111-1307, USA. | | ## -*- texinfo -*- | ! ## at deftypefn {Function File} {} contour (@var{z}, @var{n}) | ! ## at deftypefnx {Function File} {} contour (@var{x}, @var{y}, @var{z}, @var{n}) | ## Make a contour plot of the three-dimensional surface described by | ## at var{z} dot Someone needs to improve @code{gnuplot}'s contour routines | ## before this will be very useful. | *************** | *** 28,44 **** | | ## Author: jwe | | ! function contour (z, n, x, y) | ! | ! if (nargin == 1) | ! n = 10; | ! endif | | ## XXX FIXME XXX -- these plot states should really just be set | ## temporarily, probably inside an unwind_protect block, but there is | ## no way to determine their current values. | | if (nargin == 1 || nargin == 2) | if (is_matrix (z)) | gset nosurface; | gset contour; | --- 29,47 ---- | | ## Author: jwe | | ! function contour (x, y, z, n) | | ## XXX FIXME XXX -- these plot states should really just be set | ## temporarily, probably inside an unwind_protect block, but there is | ## no way to determine their current values. | | if (nargin == 1 || nargin == 2) | + z = x; | + if (nargin == 1) | + n = 10; | + else | + n = y; | + endif | if (is_matrix (z)) | gset nosurface; | gset contour; ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------