Plotting problem again

Thomas Weber thomas.weber.mail at gmail.com
Sun Jun 1 07:07:34 CDT 2008


[cc'ing bugs, this looks like a bug]

I think the order of the elseif and else branches should be reverted,
see attached patch. No hg changeset, as I want to discuss this first.

On 01/06/08 03:58 -0700, asha g wrote:
> I am plotting the same data as before vvvv is a fn of x and y. 
> size(vvvv) = 10 10
> length(x) = 10
> length(y) = 10
> 
> When I give a plot3(x,y,vvvv) command I get the following error:
> 
> ans =
> 
>    10   10
> 
> error: plot3: [length(x), length(y)] must match size(z)
> error: evaluating if command near line 159, column 2
> error: evaluating if command near line 158, column 7
> error: evaluating if command near line 113, column 5
> error: evaluating while command near line 103, column 3
> error: called from `plot3' in file `/usr/local/share/octave/3.0.0/m/plot/plot3.m'
> error: near line 109 of file `/home/proj/08/cesasha/aseasha/cabunbactoct.

	Thomas
-------------- next part --------------
diff -r d4565e812948 scripts/plot/plot3.m
--- a/scripts/plot/plot3.m	Wed May 21 22:27:07 2008 +0200
+++ b/scripts/plot/plot3.m	Sun Jun 01 14:05:02 2008 +0200
@@ -269,9 +269,9 @@
 	y = y(:);
 	z = z(:);
       elseif (length (x) == rows (z) && length (y) == columns (z))
+	[x, y] = meshgrid (x, y);
+      else
 	error ("plot3: [length(x), length(y)] must match size(z)");
-      else
-	[x, y] = meshgrid (x, y);
       endif
     endif
 


More information about the Bug-octave mailing list