On Thursday 27 February 2003 23:11, Alan W. Irwin wrote:
> On Thu, 27 Feb 2003, [iso-8859-1] Jo=E3o Cardoso wrote:
> > My question is if we should not abandon the bug fix release, and take
> > the April opportunity to make a new real release instead.
> I agree 100 per cent with Rafael's response on this question. What is =
> CVS at release time defines whether the release is bug-fix or not.
> > [...]I have a new API
> > entry to submit. It's an utility function to grid data, removing the
> > limitation that our 3D data plots have of using regularly sampled dat=
> How does this compare with the pltr1 and pltr2 interpolation that alrea=
> exists for the plcont and plshade(s) part of our 3D API? I don't mind
> adding an additional interpolation scheme possibility so long as it
> can be used in the same way pltr1 and pltr2 are used now.
I didn't take the approach of provinding another pltr*().
Instead, if the user has irregularly sampled data he must call plgriddata=
obtain gridded data; after that he can use the usual 3D data APIs, whatev=
they are, from plshade() to plot3d(), plsurf3d() or whatsoever.
That's why I call plgriddata() an utility function, as the user can use i=
own gridding algorithm instead.
This is the relevant plplot.h section:
/* grid irregularly sampled data */
plgriddata(PLFLT *x, PLFLT *y, PLFLT *z, int npts,
=09 PLFLT *xg, int nptsx, PLFLT *yg, int nptsy,
=09 PLFLT **zg, int type, PLFLT data);
/* type of gridding algorithm for plgriddata() */
#define GRID_CSA 1 /* Bivariate Cubic Spline approximation */
#define GRID_DTLI 2 /* Delaunay Triangulation Linear Interpolation */
#define GRID_NNI 3 /* Natural Neighbors Interpolation */
#define GRID_NNIDW 4 /* Nearest Neighbors Inverse Distance Weighted */
#define GRID_NNLI 5 /* Nearest Neighbors Linear Interpolation */
#define GRID_NNAIDW 6 /* Nearest Neighbors Around Inverse Distance Weight=
GRID_CSA uses libcsa, GRID_DTLI and GRID_NNI uses nn (that uses Qhull), =
GRID_NNIDW, GRID_NNLI and GRID_NNAIDW are implemented in plgriddata.c.
x, y and z are ntps sized input arrays; xg[ntpsx] and yg[ntpsy] define th=
desired grid size and spacing, while zg[nptsx][nptsy] is the output gridd=
> A related issue is this may be a good opportunity to generalize our
> argument lists for all our 3D functions. For now plcont and plshades al=
> PLcGrid or PLcGrid2 style arguments to pass the x,y information and
> interpolate with pltr1, pltr2, or any other interpolation function
> specified by the user. Those arguments have enough generality so that t=
> x,y surface can be irregular in shape (something I need for my research=
> all the 3D API). Thus, I would like to see the plcont and plshade(s) sc=
> for passing the x,y information adopted for plsurf3d and the rest of ou=
I really don't want to mess with some plot functions internals. Often the=
were designed with a certain objective in mind, and changing them with=20
another objective can turns the code confusing.
This does not means that it can't be done, perhaps in an elegant way, I d=
know, as I never looked at them from that perspective.
> This additional facility should, of course, be implemented as added API
> rather than changed API. There is certainly a place for simple 3D API
> calls where x and y appear as separate arrays rather than as part of a
> PLcGrid or PLcGrid2 structure. But I (and presumably many other users)
> need the other more general alternative as well. To be blunt about thi=
> gnuplot has allowed irregular shaped x,y domains for all their 3D API s=
> 1996, and I think it is long past time that PLplot caught up.
I don't know how gnuplot does it internally, I only know that irregular=20
gridded data is allowed.
> Alan W. Irwin
> email: irwin@...
> phone: 250-727-2902
> Astronomical research affiliation with Department of Physics and Astron=
> University of Victoria (astrowww.phys.uvic.ca).
> Programming affiliations with the Canadian Centre for Climate Modelling=
> Analysis (www.cccma.bc.ec.gc.ca) and the PLplot scientific plotting
> software package (plplot.org).
> Linux-powered Science
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> Plplot-devel mailing list