From: Ben Abbott <address@hidden>
Subject: Re: Plotting problem again
To: address@hidden
Cc: address@hidden
Date: Monday, June 2, 2008, 5:15 PM
On Jun 2, 2008, at 2:39 AM, asha g wrote:
--- On Mon, 6/2/08, Ben Abbott
<address@hidden> wrote:
From: Ben Abbott <address@hidden>
Subject: Re: Plotting problem again
To: address@hidden
Cc: address@hidden
Date: Monday, June 2, 2008, 7:31 AM
On Jun 1, 2008, at 7:30 PM, asha g wrote:
Hi everyone,
Thanks for looking into my problem. I am
resending the
code so that
the problem becomes clear. I hope it is a bug
that can
be fixed soon
so I can start plotting correctly again. I
also have
problems with
mesh as I said before.
N = 10; l = 0.6; niter = 10; deltaT =
0.0017778;
t= (niter)*deltaT;
x =linspace(0,l,N);
y= linspace(0,t,niter);
vvvv =
Columns 1 through 6:
-6.9978e+01 -6.9978e+01 -6.9978e+01
-6.9978e+01
-6.9978e+01
-6.9978e+01
-6.9956e+01 -6.9956e+01 -6.9956e+01
-6.9956e+01
-6.9956e+01
-6.9956e+01
-6.9934e+01 -6.9934e+01 -6.9934e+01
-6.9934e+01
-6.9934e+01
-6.9934e+01
-6.9913e+01 -6.9913e+01 -6.9909e+01
-6.9915e+01
-6.9912e+01
-6.9913e+01
-6.9878e+01 -6.9878e+01 -7.0015e+01
-6.9764e+01
-6.9961e+01
-6.9863e+01
-7.0162e+01 -7.0162e+01 -6.4295e+01
-7.6717e+01
-6.4997e+01
-7.2335e+01
-6.3341e+01 -6.3341e+01 -3.3817e+02
3.0088e+02
-3.7816e+02
1.1724e+02
-1.5800e+02 -1.5800e+02 1.3585e+04
-2.0477e+04
1.8784e+04
-1.3063e+04
-3.9643e+03 -3.9643e+03 -7.4331e+05
NaN
-1.1647e
+06 NaN
NaN NaN NaN
NaN
NaN NaN
Columns 7 through 10:
-6.9978e+01 -6.9978e+01 -6.9978e+01
-6.9978e+01
-6.9956e+01 -6.9956e+01 -6.9956e+01
-6.9956e+01
-6.9934e+01 -6.9934e+01 -6.9934e+01
-6.9934e+01
-6.9912e+01 -6.9912e+01 -6.9912e+01
-6.9912e+01
-6.9900e+01 -6.9888e+01 -6.9890e+01
-6.9891e+01
-6.8879e+01 -7.0176e+01 -6.9907e+01
-6.9817e+01
-1.5895e+02 -3.8642e+01 -6.5889e+01
-7.4971e+01
6.9798e+03 -2.8032e+03 -4.0468e+02
3.9483e+02
-5.2204e+05
2.1534e+05 2.5020e+04 -3.8420e+04
NaN NaN NaN
NaN
~
~
~
I hope you can figure out what is happening
now.
Thanks
Asha
Using Thomas' patch plot3(x,y,vvv) gives the
expected
result.
I also have no problem with mesh(x,y,vvv).
Although I'm running the default branch from
jwe's
mercurial archive,
I don't see a record in the ChangeLog that
indicates
anything has
changed since 3.0.0 was released.
Have you tried Thomas' patch to plot3? ... and
what
problem do you
encounter with mesh?
Ben
I am not sure how to use the patch.
I am seeing that the problem surfaces when N= 10 and
niter = 10.
In other cases eg niter = 100, N= 10, it plots but a
get a message
saying:
Notice: No surface grid anything could be hidden
behind
Notice: No surface grid anything could be hidden
behind
octave:3> Notice: No surface grid anything could be
hidden behind
Mesh: I am only getting a 2-D grid and not a 3 D mesh.
Asha
Thomas' patch changes the "if" block near
lines 266-276 to that below
if (isvector (x) && isvector (y))
if (isvector (z))
x = x(:);
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)");
endif
endif
Is that sufficient info for you to edit plot.m and make the
change? If
not I (or someone else) can give a short description of how
to apply
the patch directly.
Ben