From: Jerry <lan...@qw...> - 2006-12-06 10:32:06
|
plot.h contains the following. Is this correct? Is there one extra array or one too few dimension sizes or do I need to study the docs more? Jerry /* * PLcGrid2 is for passing (as arrays of pointers) 2d coordinate * transformation arrays. The grid dimensions are passed for possible bounds * checking. */ typedef struct { PLFLT **xg, **yg, **zg; PLINT nx, ny; } PLcGrid2; |
From: Jerry <lan...@qw...> - 2006-12-06 10:43:19
|
On Dec 6, 2006, at 3:32 AM, Jerry wrote: > plot.h contains the following. Is this correct? Is there one extra > array or one too few dimension sizes or do I need to study the docs > more? > Jerry > > /* > * PLcGrid2 is for passing (as arrays of pointers) 2d coordinate > * transformation arrays. The grid dimensions are passed for possible > bounds > * checking. > */ > > typedef struct { > PLFLT **xg, **yg, **zg; > PLINT nx, ny; > } PLcGrid2; > > (Replying to self) Hmmm.... I'll bet zg contains the data to be plotted, xg contains the grid points where it "is," and yg contains the grid points where it "is supposed to be," and all three are nx by ny in size. Jerry |
From: Arjen M. <arj...@wl...> - 2006-12-06 10:52:22
|
Jerry wrote: >On Dec 6, 2006, at 3:32 AM, Jerry wrote: > > > >>plot.h contains the following. Is this correct? Is there one extra >>array or one too few dimension sizes or do I need to study the docs >>more? >>Jerry >> >>/* >>* PLcGrid2 is for passing (as arrays of pointers) 2d coordinate >>* transformation arrays. The grid dimensions are passed for possible >>bounds >>* checking. >>*/ >> >>typedef struct { >> PLFLT **xg, **yg, **zg; >> PLINT nx, ny; >>} PLcGrid2; >> >> >> >> >(Replying to self) > >Hmmm.... I'll bet zg contains the data to be plotted, xg contains the >grid points where it "is," and yg contains the grid points where it >"is supposed to be," and all three are nx by ny in size. > > > Hello Jerry, yes, that is what is happening. The arrays are built like this: - xg is an array of pointers - each element of xg is a pointer to an array of floating-point numbers (same for yg and zg). The Plcgrid2 and similar data types are mostly used internally. Regards, Arjen |