On Monday, April 19, 2010 at 15:22:14 (-0700) Alan W. Irwin writes:
 > On 2010-04-19 13:47-0700 Ed Zaron wrote:
 > 
 > > Hi All,
 > 
 > > I've been using plplot for a project where we have to plot so-called
 > "co-tidal charts" which display the amplitude and phase of the tide in the
 > ocean. The amplitude is normally shown with a color image (made with
 > plimage), and the phase is shown with contours (using the fortran interface,
 > plcon1).
 > 
 > > As you may know, contours of phase data have jumps where the phase wraps
 > around, say, the 0/360 degree reference phase. This leads to situations in
 > contour plots where the phase is contoured nicely, except where these jumps
 > occur. Within the jump, all the contour lines are packed into the jump. This
 > is an unavoidable consequence of trying to contour phase in 2-d, whenever
 > the field has zero amplitude points (so-called, amphidromes, in the tidal
 > context) where the phase is undefined.
 > 
 > > I've attached a little patch to plplot/src/plcont.c from a freshly checked
 > out source distribution (r10926). I wonder if you might consider adding a
 > new subroutine to the plplot library, say, plcont_phase, which would
 > correctly represent phase contours without the jumps?
 > 
 > Hi Ed:
 > 
 > I haven't looked at your patch, but I assume it processes phase data to
 > impose phase continuity so that after processing you end up (in general)
 > with a continous phase range from -M*360 deg to N*360 deg which is easy to
 > contour.
 > 
 > Assuming your patch does something like that, the question which I would
 > like you to discuss further is whether this is of sufficient usefulness to
 > PLplot users to add this functionality to our API for all the languages we
 > support or whether this straightforward processing to impose phase
 > continuity should be done by individual users before they call PLplot with
 > their (now) continuous phase data.

I agree with Alan, AFAICT the phase transformation can & therefore should be
done in user space.  I suggest a suitable wrapper function on your end, to
copy and transform the data as necessary.

Note, people doing polar plots (shades or contours) have to similarly massage
their data before passing it to plplot in order to pick up the continuity
condition at angle 0 = 2pi.  One could claim this is an important effect for
the library to handle natively, but frankly I've never seen the need,
preferring a leaner and more easily maintained API.  This is illustrated
(rather quietly) in the final (polar) plot of example 16, where the angle
coordinate value runs from 0 to 2pi inclusive -- providing a duplicated data
point to enforce continuity.

-- 
Maurice LeBrun

------------------------------------------------------------------------------
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