plshade has three "groups" of parameters that I am having a hard time  
understanding:

1) xmin,xmax,ymin,ymax - "Define the 'grid' coordinates.  The data a 
[0][0] has a position of (xmin,ymin), a[nx-1][0] has a position at  
(xmax,ymin) and so on."

2) defined - "User function specifying regions excluded from the  
shading plot. This function accepts x and y coordinates as input  
arguments and must return 0 if the point is in the excluded region or  
1 otherwise. This argument can be NULL if all the values are valid."

3) pltr, pltr_data parameters which translate 2D data indices into  
world coordinates.

I think I understand pltr,pltr_data since those are also used in the  
plcont functions, but I have questions about the other two groups.

What is the purpose of explicitly specifying xmin,xmax,ymin,ymax?   
Based on the comments/documentation, it sounds like xmin,ymin could  
be determined by passing (0,0) to pltr and xmax,ymax could be  
determined by passing (nx-1,ny-1).  At least that's the case for  
pltr0 and pltr1 (with monotonic x and y grid axes), but for pltr2 the  
mapping from 2D data indices to world coordinates seems arbitrary  
(e.g. polar to rectangular) so determining xmin etc from pltr is not  
really viable.  While that sounds like a valid reason for specifying  
xmin etc explicitly, the code for plshade looks like it uses (xmax- 
xmin)/nx to determine "dx" (and likewise for "dy"), which seems to  
assume a linear mapping from i and j indices to x and y world  
coordinates, so I'm back to being confused.

Since "defined" does not have a corresponding "user data" pointer, it  
seems that whether a point is "defined" or not must be determinable  
solely from the x,y coordinates themselves and not from the 2D data  
values (or accompanying "data valid" flags array).  Is the primary  
intent of this to limit the region that is shaded (kind if like  
kx,lx,ky,ly for plcont, but in world coordinates rather than 2D data  
indices)?

FWIW, these questions arose because I'm trying to figure out the best  
way to deal with these parameters in my Ruby bindings.

Thanks,
Dave


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs 
proactively, and fine-tune applications for parallel performance. 
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to