From: Oliver B. <ol...@fi...> - 2008-02-29 09:50:49
|
Hello, in Example 11 I found graphics, which looks similar to what I wanted to have. I browsed through the code and found plAlloc2dGrid(). In tge pdf-version of the documentation I found it mentioned one time, but without any description. In the online html-version I didn't found it. Possibly the examples reason is, to better understand how to use plplot-lib, but when the examples use non-documented functions, they do not really help... Are their additional ressources somewhere, which I can look at ( I do not mean the plplot-lib sources, maybe some more documentation)?! Ciao, Oliver P.S.: The same problem I found for: plMinMax2dGrid() and plFree2dGrid() |
From: Arjen M. <arj...@wl...> - 2008-02-29 10:10:36
|
Oliver Bandel wrote: >Hello, > >in Example 11 I found graphics, which looks similar to what I >wanted to have. > >I browsed through the code and found >plAlloc2dGrid(). >In tge pdf-version of the documentation I found it mentioned one time, >but without any description. >In the online html-version I didn't found it. > > >Possibly the examples reason is, to better understand >how to use plplot-lib, but when the examples use >non-documented functions, they do not really help... > >Are their additional ressources somewhere, which I can >look at ( I do not mean the plplot-lib sources, maybe >some more documentation)?! > >Ciao, > Oliver > >P.S.: The same problem I found for: > plMinMax2dGrid() > and > plFree2dGrid() > > Hello Oliver, the documentation certainly could do with a bit of work. I do not think there is more information about the use of these routines/functions beyond what you have already found. But as these functions have a simple interface, illustrated by the examples, can you understand their use or do you need a more detailed description right now? (The documentation will have to extended, I agree). Regards, Arjen |
From: Andrew R. <and...@us...> - 2008-02-29 10:46:41
|
On Fri, Feb 29, 2008 at 11:10:30AM +0100, Arjen Markus wrote: > Oliver Bandel wrote: > > >Hello, > > > >in Example 11 I found graphics, which looks similar to what I > >wanted to have. > > > >I browsed through the code and found > >plAlloc2dGrid(). > >In tge pdf-version of the documentation I found it mentioned one time, > >but without any description. > >In the online html-version I didn't found it. > > > > > >Possibly the examples reason is, to better understand > >how to use plplot-lib, but when the examples use > >non-documented functions, they do not really help... > > > >Are their additional ressources somewhere, which I can > >look at ( I do not mean the plplot-lib sources, maybe > >some more documentation)?! > > > >Ciao, > > Oliver > > > >P.S.: The same problem I found for: > > plMinMax2dGrid() > > and > > plFree2dGrid() > > > > > Hello Oliver, > > the documentation certainly could do with a bit of work. > I do not think there is more information about the use of > these routines/functions beyond what you have already > found. But as these functions have a simple interface, > illustrated by the examples, can you understand their > use or do you need a more detailed description right > now? (The documentation will have to extended, > I agree). Oliver, The reason (not an excuse!) that these functions are not documented is that they are not part of our common API. They are only used in the C examples and are provided as a convenience. Plplot just uses standard C 2-d arrays. You can allocate and free these yourself using malloc / free if you like. Of course other languages have their own way of allocating arrays and so don't need these functions for the other bindings. Having said that, we should document them. Thanks for pointing this out. Andrew |
From: Maurice L. <mj...@br...> - 2008-03-01 13:15:09
|
On Friday, February 29, 2008 at 10:46:02 (+0000) Andrew Ross writes: > ... > The reason (not an excuse!) that these functions are not documented is > that they are not part of our common API. They are only used in the C > examples and are provided as a convenience. Plplot just uses standard C > 2-d arrays. You can allocate and free these yourself using malloc / > free if you like. Of course other languages have their own way of > allocating arrays and so don't need these functions for the other > bindings. A caveat: these are not quite the same thing as "standard C 2-d arrays", that is if you mean the result of: PLFLT f[nx][ny]; These are a poor substitute for a real type, which should either know its dimensions or at least be addressable without carrying extra baggage along. So instead of an array of pointers to PLFLT, this is an array of an array of pointers to PLFLT (right about now the Fortran folks are probably shuddering). While convenient, it's also a lousy data storage layout for high-speed trips through an inner loop due to stride issues. No problem -- store the data however you want in your code for maximum efficiency, and then copy it to one of these plAlloc2dGrid style arrays when getting ready to plot. Or use one of the function evaluator approaches to lookup your data in its native format. * plAlloc2dGrid() * * Allocates a block of memory for use as a 2-d grid of PLFLT's. * Resulting array can be indexed as f[i][j] anywhere. This is to be used * instead of PLFLT f[nx][ny], which is less useful. Note that this type * of allocation is required by the PLplot functions which take a 2-d * grids of PLFLT's as an argument, such as plcont() and plot3d(). * Example usage: * * PLFLT **z; * * Alloc2dGrid(&z, XPTS, YPTS); > Having said that, we should document them. Thanks for pointing this out. > > Andrew -- Maurice LeBrun |
From: Maurice L. <mj...@br...> - 2008-03-01 13:22:24
|
On Saturday, March 1, 2008 at 07:15:12 (-0600) Maurice LeBrun writes: > On Friday, February 29, 2008 at 10:46:02 (+0000) Andrew Ross writes: > > ... > > The reason (not an excuse!) that these functions are not documented is > > that they are not part of our common API. They are only used in the C > > examples and are provided as a convenience. Plplot just uses standard C > > 2-d arrays. You can allocate and free these yourself using malloc / > > free if you like. Of course other languages have their own way of > > allocating arrays and so don't need these functions for the other > > bindings. > > A caveat: these are not quite the same thing as "standard C 2-d arrays", > that is if you mean the result of: > > PLFLT f[nx][ny]; > > These are a poor substitute for a real type, which should either know its > dimensions or at least be addressable without carrying extra baggage along. Sorry for the misuse of English. From this point on I am talking about plAlloc2dGrid() style storage only. > So instead of an array of pointers to PLFLT, this is an array of an array of > pointers to PLFLT (right about now the Fortran folks are probably shuddering). > > While convenient, it's also a lousy data storage layout for high-speed trips > through an inner loop due to stride issues. No problem -- store the data > however you want in your code for maximum efficiency, and then copy it to one > of these plAlloc2dGrid style arrays when getting ready to plot. Or use one of > the function evaluator approaches to lookup your data in its native format. > > * plAlloc2dGrid() > * > * Allocates a block of memory for use as a 2-d grid of PLFLT's. > * Resulting array can be indexed as f[i][j] anywhere. This is to be used > * instead of PLFLT f[nx][ny], which is less useful. Note that this type > * of allocation is required by the PLplot functions which take a 2-d > * grids of PLFLT's as an argument, such as plcont() and plot3d(). > * Example usage: > * > * PLFLT **z; > * > * Alloc2dGrid(&z, XPTS, YPTS); > > > Having said that, we should document them. Thanks for pointing this out. > > > > Andrew > > -- > Maurice LeBrun > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Plplot-general mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-general -- Maurice LeBrun |