|
From: <ai...@us...> - 2014-03-04 21:09:32
|
Revision: 13038
http://sourceforge.net/p/plplot/code/13038
Author: airwin
Date: 2014-03-04 21:09:29 +0000 (Tue, 04 Mar 2014)
Log Message:
-----------
Propagate plot3dcl and plsurf3dcl to Octave binding for PLplot.
Build tested on Linux, and I also demonstrated with interactive octave
use that "help plot3dcl" and "help plsurf3dcl" give the expected
(because of the Octave help string bug for UTF-8) truncated result.
There were no run time tests of these functions since they are not
(yet) used in any examples.
Modified Paths:
--------------
trunk/bindings/octave/plplot_octave.i
trunk/bindings/swig-support/swig_documentation.i
Modified: trunk/bindings/octave/plplot_octave.i
===================================================================
--- trunk/bindings/octave/plplot_octave.i 2014-03-04 20:42:19 UTC (rev 13037)
+++ trunk/bindings/octave/plplot_octave.i 2014-03-04 21:09:29 UTC (rev 13038)
@@ -1182,8 +1182,8 @@
}
}
-// %feature commands supporting swig-generated documentation for the bindings.
-// Must occur before any %ignore directives or %rename directives.
+//%feature commands supporting swig-generated documentation for the bindings.
+// Must occur before any%ignore directives or%rename directives.
%include swig_documentation.i
// This test function should be removed when we are confident of our
@@ -1364,7 +1364,8 @@
PLINT ly, const PLFLT *clevel, PLINT nlevel, const PLFLT *xg, const PLFLT *yg )
{
PLcGrid2 grid2;
- f2c( xg, xgg, nx, ny ); f2c( yg, ygg, nx, ny );
+ f2c( xg, xgg, nx, ny );
+ f2c( yg, ygg, nx, ny );
grid2.nx = nx; grid2.ny = ny;
grid2.xg = xgg; grid2.yg = ygg;
f2c( f, ff, nx, ny );
@@ -1377,7 +1378,8 @@
PLINT ly, const PLFLT *clevel, PLINT nlevel, const PLFLT *xg, const PLFLT *yg )
{
PLcGrid2 grid2;
- f2c( xg, xgg, nx, ny ); f2c( yg, ygg, nx, ny );
+ f2c( xg, xgg, nx, ny );
+ f2c( yg, ygg, nx, ny );
grid2.nx = nx; grid2.ny = ny;
grid2.xg = xgg; grid2.yg = ygg;
f2c( f, ff, nx, ny );
@@ -1454,14 +1456,14 @@
%ignore plot3dc;
%rename( plot3dc ) my_plot3dc;
%ignore plot3dcl;
-//unimplemented:%rename(plot3dcl) my_plot3dcl;
+%rename( plot3dcl ) my_plot3dcl;
%{
// Plots a 3-d representation of the function z[x][y].
void my_plot3d( const PLFLT *x, const PLFLT *y, const PLFLT *z,
PLINT nx, PLINT ny, PLINT opt, PLINT side )
{
- f2c( z, zz, nx, ny )
+ f2c( z, zz, nx, ny );
c_plot3d( x, y, (const PLFLT **) zz, nx, ny, opt, side );
}
@@ -1470,9 +1472,20 @@
PLINT nx, PLINT ny, PLINT opt,
const PLFLT *clevel, PLINT nlevel )
{
- f2c( z, zz, nx, ny )
+ f2c( z, zz, nx, ny );
c_plot3dc( x, y, (const PLFLT **) zz, nx, ny, opt, clevel, nlevel );
}
+// Plots a 3-d representation of the function z[x][y] with contour with y
+// index limits
+ void my_plot3dcl( const PLFLT * x, const PLFLT * y, const PLFLT * z,
+ PLINT nx, PLINT ny, PLINT opt,
+ const PLFLT * clevel, PLINT nlevel,
+ PLINT indexxmin, PLINT indexxmax, const PLINT * indexymin, const PLINT * indexymax )
+ {
+ f2c( z, zz, nx, ny );
+ c_plot3dcl( x, y, (const PLFLT **) zz, nx, ny, opt, clevel, nlevel,
+ indexxmin, indexxmax, indexymin, indexymax );
+ }
%}
void my_plot3d( const PLFLT *ArrayX, const PLFLT *ArrayY, const PLFLT *MatrixCk,
@@ -1481,24 +1494,41 @@
void my_plot3dc( const PLFLT *ArrayX, const PLFLT *ArrayY, const PLFLT *MatrixCk,
PLINT nx, PLINT ny, PLINT opt, const PLFLT *Array, PLINT n );
+void my_plot3dcl( const PLFLT *ArrayX, const PLFLT *ArrayY, const PLFLT *MatrixCk,
+ PLINT nx, PLINT ny, PLINT opt, const PLFLT *Array, PLINT n,
+ PLINT ixstart, PLINT n, const PLINT *Array, const PLINT *ArrayCk );
+
// plsurf3d-related wrappings:
%ignore plsurf3d;
%rename( plsurf3d ) my_plsurf3d;
%ignore plsurf3dl;
-//unimplemented:%rename(plsurf3d) my_plsurf3d;
+%rename( plsurf3dl ) my_plsurf3dl;
%{
void my_plsurf3d( const PLFLT *x, const PLFLT *y, const PLFLT *z,
PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel )
{
- f2c( z, zz, nx, ny )
+ f2c( z, zz, nx, ny );
c_plsurf3d( x, y, (const PLFLT **) zz, nx, ny, opt, clevel, nlevel );
}
+
+ void my_plsurf3dl( const PLFLT * x, const PLFLT * y, const PLFLT * z,
+ PLINT nx, PLINT ny, PLINT opt, const PLFLT * clevel, PLINT nlevel,
+ PLINT indexxmin, PLINT indexxmax, const PLINT * indexymin, const PLINT * indexymax )
+ {
+ f2c( z, zz, nx, ny );
+ c_plsurf3dl( x, y, (const PLFLT **) zz, nx, ny, opt, clevel, nlevel,
+ indexxmin, indexxmax, indexymin, indexymax );
+ }
%}
void my_plsurf3d( const PLFLT *ArrayX, const PLFLT *ArrayY, const PLFLT *MatrixCk,
PLINT nx, PLINT ny, PLINT opt, const PLFLT *Array, PLINT n );
+void my_plsurf3dl( const PLFLT *ArrayX, const PLFLT *ArrayY, const PLFLT *MatrixCk,
+ PLINT nx, PLINT ny, PLINT opt, const PLFLT *Array, PLINT n,
+ PLINT ixstart, PLINT n, const PLINT *Array, const PLINT *ArrayCk );
+
// plshade-related wrappers.
%ignore plshade;
@@ -1558,7 +1588,8 @@
PLINT rectangular, const PLFLT *xg, const PLFLT *yg )
{
PLcGrid2 grid2;
- f2c( xg, xgg, nx, ny ); f2c( yg, ygg, nx, ny );
+ f2c( xg, xgg, nx, ny );
+ f2c( yg, ygg, nx, ny );
grid2.nx = nx; grid2.ny = ny;
grid2.xg = xgg; grid2.yg = ygg;
f2c( a, aa, nx, ny );
@@ -1660,7 +1691,8 @@
PLINT rectangular, const PLFLT *xg, const PLFLT *yg )
{
PLcGrid2 grid2;
- f2c( xg, xgg, nx, ny ); f2c( yg, ygg, nx, ny );
+ f2c( xg, xgg, nx, ny );
+ f2c( yg, ygg, nx, ny );
grid2.nx = nx; grid2.ny = ny;
grid2.xg = xgg; grid2.yg = ygg;
f2c( a, aa, nx, ny );
@@ -1728,7 +1760,8 @@
void my_plvect2( const PLFLT *u, const PLFLT *v, PLINT nx, PLINT ny, PLFLT scale, const PLFLT *xg, const PLFLT *yg )
{
PLcGrid2 grid2;
- f2c( xg, xgg, nx, ny ); f2c( yg, ygg, nx, ny );
+ 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 );
@@ -1806,7 +1839,8 @@
PLFLT valuemin, PLFLT valuemax, const PLFLT *xg, const PLFLT *yg )
{
PLcGrid2 grid2;
- f2c( xg, xgg, ( nx + 1 ), ( ny + 1 ) ); f2c( yg, ygg, ( nx + 1 ), ( ny + 1 ) );
+ f2c( xg, xgg, ( nx + 1 ), ( ny + 1 ) );
+ f2c( yg, ygg, ( nx + 1 ), ( ny + 1 ) );
grid2.nx = nx + 1; grid2.ny = ny + 1;
grid2.xg = xgg; grid2.yg = ygg;
f2c( a, aa, nx, ny );
Modified: trunk/bindings/swig-support/swig_documentation.i
===================================================================
--- trunk/bindings/swig-support/swig_documentation.i 2014-03-04 20:42:19 UTC (rev 13037)
+++ trunk/bindings/swig-support/swig_documentation.i 2014-03-04 21:09:29 UTC (rev 13038)
@@ -3749,7 +3749,11 @@
index in the range from indexxmin to indexxmax - 1. The dimension
of indexymax is indexxmax.
")
+#ifdef SWIG_OCTAVE
+my_plot3dcl;
+#else
plot3dcl;
+#endif
%feature( "docstring", "Parse command-line arguments
@@ -6566,7 +6570,11 @@
index in the range from indexxmin to indexxmax - 1. The dimension
of indexymax is indexxmax.
")
+#ifdef SWIG_OCTAVE
+my_plsurf3dl;
+#else
plsurf3dl;
+#endif
%feature( "docstring", "Plot shaded 3-d surface plot
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|