|
From: Frederick G. <fg...@no...> - 2003-03-27 15:24:34
|
Howdy,
I am trying to make a 3d plot and having troubles. I have read through the online
documentation and chunks of the plplot code base. Here is my trouble. I have some code
that solves the heat eq. via forward euler and returns the array u[X][T] , 0 < x < pi , and
0 < t < 10.0. Of course this values for u are between 0 and 1. I plotted the matrix in
gnuplot and got the correct normaly lookin' graph so the solution looks correct. The number
of x sample points is J and the number of t sample points is N.
I use the code (probably incorrect to plot)
plsdev("xwin");
plinit();
plenv(0.0, 12.0, 0.0, 10.0, 0, 0); // Viewport is entire subpage
// Set window characteristics
plw3d(2.0, 4.0, 3.0, -3.5, 3.5, -10.0, 10.0, -2.0, 2.0, 45.0, 30.0);
plot3d(xc, tc, u, J, N, 3, 0);
sleep(10);
plend();
And the plot that comes up is a big mess of lines. Interestingly if I recompile and add
the configure switch --with-double this refuses to plot at all with the errors
*** PLPLOT ERROR ***
plenv: Invalid xmin and xmax arguments, aborting operation
*** PLPLOT ERROR ***
plw3d: Please set up 2-d window first, aborting operation
*** PLPLOT ERROR ***
plot3dc: Please set up window first, aborting operation
I have used 5.1.0, 5.2.0, and cvs with similar results. The environment is:
OS: Linux
LIBC: glibc 2.3.1
What sections of the documentation should I read? What am I doing wrong
Thanks,
Fred
--
#!/usr/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo
16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
|