From: <ai...@us...> - 2011-01-02 04:01:25
|
Revision: 11428 http://plplot.svn.sourceforge.net/plplot/?rev=11428&view=rev Author: airwin Date: 2011-01-02 04:01:19 +0000 (Sun, 02 Jan 2011) Log Message: ----------- Implement plvect-related wrappers which allow example 22 to run and also produce results that are equivalent to those from the corresponding C example. Modified Paths: -------------- trunk/bindings/octave/plplot_octave.i trunk/plplot_test/test_octave.sh.in Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2011-01-02 02:53:38 UTC (rev 11427) +++ trunk/bindings/octave/plplot_octave.i 2011-01-02 04:01:19 UTC (rev 11428) @@ -982,9 +982,62 @@ PLINT cont_color, PLINT cont_width, PLBOOL rectangular, PLFLT *Matrix, PLFLT *Matrix); +// plvect-related wrappers. + +%ignore plvect; +// plvect and plvect1 untested by standard examples. +%rename(plvect) my_plvect; +%rename(plvect1) my_plvect1; +%rename(plvect2) my_plvect2; + +%{ +// Plot an array of vector arrows - uses the same function pointer +// convention as plcont + +void my_plvect( PLFLT *u, PLFLT *v, PLINT nx, PLINT ny, PLFLT scale, PLFLT *tr ) +{ + f2c( u, uu, nx, ny ); + f2c( v, vv, nx, ny ); + c_plvect( uu, vv, nx, ny, scale, xform, tr ); +} + +// plvect() for use with pltr1 +void my_plvect1( PLFLT *u, PLFLT *v, PLINT nx, PLINT ny, PLFLT scale, PLFLT *xg, PLFLT *yg ) +{ + PLcGrid grid1; + grid1.nx = nx; grid1.ny = ny; + grid1.xg = xg; grid1.yg = yg; + f2c( u, uu, nx, ny ); + f2c( v, vv, nx, ny ); + c_plvect( uu, vv, nx, ny, scale, pltr1, &grid1 ); +} + +// plvect() for use with pltr2 +void my_plvect2( PLFLT *u, PLFLT *v, PLINT nx, PLINT ny, PLFLT scale, PLFLT *xg, PLFLT *yg ) +{ + PLcGrid2 grid2; + f2c( xg, xgg, nx, ny ); f2c( yg, ygg, nx, ny ); + grid2.nx = nx; grid2.ny = ny; + grid2.xg = xgg; grid2.yg = ygg; + f2c( u, uu, nx, ny ); + f2c( v, vv, nx, ny ); + c_plvect( uu, vv, nx, ny, scale, pltr2, &grid2 ); +} +%} + +void my_plvect( PLFLT *Matrix, PLFLT *MatrixCk, PLINT nx, PLINT ny, PLFLT scale, + PLFLT *Array ); + +void my_plvect1( PLFLT *Matrix, PLFLT *MatrixCk, PLINT nx, PLINT ny, PLFLT scale, + PLFLT *ArrayCkX, PLFLT *ArrayCkY ); + +void my_plvect2( PLFLT *Matrix, PLFLT *MatrixCk, PLINT nx, PLINT ny, PLFLT scale, + PLFLT *Matrix, PLFLT *Matrix); + + + // Deal with these later. %ignore pllegend; -%ignore plvect; %ignore plimage; %ignore plimagefr; // Probably never. Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2011-01-02 02:53:38 UTC (rev 11427) +++ trunk/plplot_test/test_octave.sh.in 2011-01-02 04:01:19 UTC (rev 11428) @@ -78,7 +78,7 @@ # 21: plgriddata and 3D plots # 22: plvector related wrappers. # until typemaps for swig-generated interface are done. -@swig_octave_comment@for i=[1:18 23:31] ; +@swig_octave_comment@for i=[1:18 22:31] ; @matwrap_octave_comment@for i=[1:18 20:31 ] ; ofile = sprintf("${OUTPUT_DIR}/x%.2d${lang}_${dsuffix}.txt",i); strm = fopen(ofile,"w"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |