From: Paulo C. <co...@as...> - 2004-10-14 21:19:49
|
Hi I am using plplot to plot a vector field, but am having problems. I get the vector field, but I also get a line that goes from the lower left corner to the upper right corner of the plot, I can't get rid of it. any ideas? Thanks!!!!! Paulo |
From: Andrew R. <and...@us...> - 2004-10-14 22:09:49
|
On Thu, Oct 14, 2004 at 04:20:53PM -0500, Paulo Cortes wrote: > Hi > > I am using plplot to plot a vector field, but > am having problems. I get the vector field, but I also > get a line that goes from the lower left corner to the > upper right corner of the plot, I can't get rid of it. > any ideas? Could it possibly be your array size is not quite right? Otherwise it is hard to tell from your description. Can so provide us with a simple example code? Andrew |
From: Paulo C. <co...@as...> - 2004-10-15 01:25:13
|
Hi thanks for the reply I wasn't that explicit because I wasn't sure if the list was alive :). Here is little piece of my code. PMap(i,j).getDensity() is an angle (polarization angle). I get the shape that I should; except for a line like this: | * | * | * |* _ _ _ _ in front of the vector field. Thanks!!! Paulo ps. Is it politically correct to include an image as an attachment? so I can include my problem? nx=33;ny=33;nz=33; for (j = 0; j<ny; j++) { for (i = 0; i<nx; i++) { x = (i-nx/2)*dx; y = (j-ny/2)*dy; cgrid2.xg[i][j] = (i-nx/2); cgrid2.yg[i][j] = (j-ny/2); printf("y=%3.1f z=%3.1f Qmap=%3.8f Umap=%3.8f\n",y,z, QMap(i,j).getDensity(),UMap(i,j).getDensity()); fpol = sqrt(QMap(i,j).getDensity()*QMap(i,j).getDensity()+ UMap(i,j).getDensity()*UMap(i,j).getDensity())/ IMap(i,j).getDensity(); u[i][j]= fpol*cos(PMap(i,j).getDensity()); v[i][j]= fpol*sin(PMap(i,j).getDensity()); pp = sqrt(u[i][j]*u[i][j] + v[i][j]*v[i][j]); } } pls->env(xmin, xmax, ymin, ymax, 0, 0); pls->lab("(x)", "(y)", "#frPLplot B field"); pls->col0(2); pls->vect(u,v,nx,ny,1.0,plstream::tr2,(void *)&cgrid2); pls->col0(1); Andrew Ross wrote: > On Thu, Oct 14, 2004 at 04:20:53PM -0500, Paulo Cortes wrote: > >>Hi >> >>I am using plplot to plot a vector field, but >>am having problems. I get the vector field, but I also >>get a line that goes from the lower left corner to the >>upper right corner of the plot, I can't get rid of it. >>any ideas? > > > Could it possibly be your array size is not quite right? Otherwise it > is hard to tell from your description. Can so provide us with a simple > example code? > > Andrew > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Plplot-general mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-general > |
From: Arjen M. <arj...@wl...> - 2004-10-15 07:23:38
|
Paulo Cortes wrote: > > Hi > > thanks for the reply I wasn't that explicit because I wasn't sure if the > list was alive :). Here is little piece of my code. > PMap(i,j).getDensity() is an angle (polarization angle). I get the shape > that I should; except for a line like this: > > | * > | * > | * > |* > _ _ _ _ > > in front of the vector field. Thanks!!! > > Paulo > > ps. Is it politically correct to include an image as an attachment? > so I can include my problem? > Hm, I can not see anything obviously wrong with your code. Perhaps the data have something strange about them? Very large values perhaps? (As internally the float coordinates are translated to integer pixel coordinates, you could be suffering from integer overflows) (If you want to send a single picture related to the problem at hand :), I guess it will not be considered rude) Regards, Arjen |