From: <arj...@us...> - 2010-11-22 08:22:43
|
Revision: 11348 http://plplot.svn.sourceforge.net/plplot/?rev=11348&view=rev Author: arjenmarkus Date: 2010-11-22 08:22:36 +0000 (Mon, 22 Nov 2010) Log Message: ----------- Implement the new function plstring() for FORTRAN 77, Fortran 90/95 and Tcl Modified Paths: -------------- trunk/bindings/f77/plplotf77.def trunk/bindings/f77/plplotf77_ifort.def trunk/bindings/f77/plplotf77_mingw.def trunk/bindings/f77/plstubs.h trunk/bindings/f77/scstubs.c trunk/bindings/f77/sfstubs.fm4 trunk/bindings/f95/plplotf95.def trunk/bindings/f95/plplotf95_ifort.def trunk/bindings/f95/plplotf95_mingw.def trunk/bindings/f95/plstubs.h trunk/bindings/f95/scstubs.c trunk/bindings/f95/sfstubs.f90 trunk/bindings/tcl/plapi.tpl trunk/examples/f77/x04f.fm4 trunk/examples/f95/x04f.f90 trunk/examples/tcl/x04.tcl Modified: trunk/bindings/f77/plplotf77.def =================================================================== --- trunk/bindings/f77/plplotf77.def 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f77/plplotf77.def 2010-11-22 08:22:36 UTC (rev 11348) @@ -40,6 +40,7 @@ _PLSPAUSE@4 _PLSTART@16 _PLSTRC2F@16 + _PLSTRING@16 _PLSTRIPC@104 _PLTIMEFMT@8 _PLVEC0@20 Modified: trunk/bindings/f77/plplotf77_ifort.def =================================================================== --- trunk/bindings/f77/plplotf77_ifort.def 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f77/plplotf77_ifort.def 2010-11-22 08:22:36 UTC (rev 11348) @@ -40,6 +40,7 @@ PLSPAUSE PLSTART PLSTRC2F + PLSTRING PLSTRIPC PLTIMEFMT PLVEC0 Modified: trunk/bindings/f77/plplotf77_mingw.def =================================================================== --- trunk/bindings/f77/plplotf77_mingw.def 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f77/plplotf77_mingw.def 2010-11-22 08:22:36 UTC (rev 11348) @@ -41,6 +41,7 @@ plspal1_ plstart_ plstrc2f_ + plstring_ plstripc_ pltimefmt_ plvec0_ Modified: trunk/bindings/f77/plstubs.h =================================================================== --- trunk/bindings/f77/plstubs.h 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f77/plstubs.h 2010-11-22 08:22:36 UTC (rev 11348) @@ -329,6 +329,7 @@ #define PLSTRANSFORM FNAME( PLSTRANSFORM, plstransform ) #define PLSTRANSFORM_NONE FNAME( PLSTRANSFORM_NONE, plstransform_none ) #define PLSTRANSFORM_NONE_ FNAME( PLSTRANSFORM_NONE_, plstransform_none_ ) +#define PLSTRING7 FNAME( PLSTRING7, plstring7 ) #define PLSTRIPA FNAME( PLSTRIPA, plstripa ) #define PLSTRIPC7 FNAME( PLSTRIPC7, plstripc7 ) #define PLSTRIPD FNAME( PLSTRIPD, plstripd ) Modified: trunk/bindings/f77/scstubs.c =================================================================== --- trunk/bindings/f77/scstubs.c 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f77/scstubs.c 2010-11-22 08:22:36 UTC (rev 11348) @@ -996,6 +996,12 @@ } void +PLSTRING7( PLINT *n, PLFLT *x, PLFLT *y, const char *string ) +{ + c_plstring( *n, x, y, string ); +} + +void PLSTRIPA( PLINT *id, PLINT *pen, PLFLT *x, PLFLT *y ) { c_plstripa( *id, *pen, *x, *y ); Modified: trunk/bindings/f77/sfstubs.fm4 =================================================================== --- trunk/bindings/f77/sfstubs.fm4 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f77/sfstubs.fm4 2010-11-22 08:22:36 UTC (rev 11348) @@ -715,7 +715,7 @@ call plsetmapformc(mapform) call plmap7(s1,minx,maxx,miny,maxy) - end subroutine + end c*********************************************************************** @@ -732,7 +732,7 @@ call plclearmapformc() call plmap7(s1,minx,maxx,miny,maxy) - end subroutine + end c*********************************************************************** @@ -748,7 +748,7 @@ call plsetmapformc(mapform) call plmeridians7(dlong,dlat,minlong,maxlong,minlat,maxlat) - end subroutine + end c*********************************************************************** @@ -764,11 +764,28 @@ call plclearmapformc() call plmeridians7(dlong,dlat,minlong,maxlong,minlat,maxlat) - end subroutine + end c*********************************************************************** + subroutine plstring(n,x,y,string) + + implicit none + integer n + real*8 x(n), y(n) + character*(*) string + + include 'sfstubs.h' + + call plstrf2c(string,s1,maxlen) + call plstring7(n,x,y,s1) + + end + + +c*********************************************************************** + subroutine plstripc(id, xspec, yspec, xmin, xmax, xjump, & ymin, ymax, xlpos, ylpos, y_ascl, acc, & colbox, collab, colline, styline, legline, Modified: trunk/bindings/f95/plplotf95.def =================================================================== --- trunk/bindings/f95/plplotf95.def 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f95/plplotf95.def 2010-11-22 08:22:36 UTC (rev 11348) @@ -75,6 +75,7 @@ _PLPLOT_mp_PLSCMAP1LA@28 _PLPLOT_mp_PLSCMAP1LA2@24 _PLPLOT_mp_PLSCMAP1L2@20 + _PLPLOT_mp_PLSTRING@16 _PLPLOT_mp_PLSTRIPC@104 _PLPLOT_mp_PLSVECT@12 _PLPLOT_mp_PLSYM@12 Modified: trunk/bindings/f95/plplotf95_ifort.def =================================================================== --- trunk/bindings/f95/plplotf95_ifort.def 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f95/plplotf95_ifort.def 2010-11-22 08:22:36 UTC (rev 11348) @@ -77,6 +77,7 @@ PLPLOT_mp_PLSCMAP1LA PLPLOT_mp_PLSCMAP1LA2 PLPLOT_mp_PLSCMAP1L2 + PLPLOT_mp_PLSTRING PLPLOT_mp_PLSTRIPC PLPLOT_mp_PLSVECT PLPLOT_mp_PLSYM Modified: trunk/bindings/f95/plplotf95_mingw.def =================================================================== --- trunk/bindings/f95/plplotf95_mingw.def 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f95/plplotf95_mingw.def 2010-11-22 08:22:36 UTC (rev 11348) @@ -75,6 +75,7 @@ __plplot_MOD_plscmap1la __plplot_MOD_plscmap1la2 __plplot_MOD_plscmap1l2 + __plplot_MOD_plstring __plplot_MOD_plstripc __plplot_MOD_plsvect __plplot_MOD_plsym Modified: trunk/bindings/f95/plstubs.h =================================================================== --- trunk/bindings/f95/plstubs.h 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f95/plstubs.h 2010-11-22 08:22:36 UTC (rev 11348) @@ -341,6 +341,7 @@ #define PLSTRANSFORM1 FNAME( PLSTRANSFORM1, plstransform1 ) #define PLSTRANSFORM2 FNAME( PLSTRANSFORM2, plstransform2 ) #define PLSTRANSFORM3 FNAME( PLSTRANSFORM3, plstransform3 ) +#define PLSTRING7 FNAME( PLSTRING7, plstring7 ) #define PLSTRIPA FNAME( PLSTRIPA, plstripa ) #define PLSTRIPC FNAME( PLSTRIPCF77, plstripcf77 ) #define PLSTRIPD FNAME( PLSTRIPD, plstripd ) Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f95/scstubs.c 2010-11-22 08:22:36 UTC (rev 11348) @@ -1077,6 +1077,12 @@ } void +PLSTRING7( PLINT *n, PLFLT *x, PLFLT *y, const char *string ) +{ + c_plstring( *n, x, y, string ); +} + +void PLSTRIPA( PLINT *id, PLINT *pen, PLFLT *x, PLFLT *y ) { c_plstripa( *id, *pen, *x, *y ); Modified: trunk/bindings/f95/sfstubs.f90 =================================================================== --- trunk/bindings/f95/sfstubs.f90 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/f95/sfstubs.f90 2010-11-22 08:22:36 UTC (rev 11348) @@ -326,6 +326,26 @@ !*********************************************************************** + subroutine plstring(x,y,string) + + implicit none + real(kind=plflt) x(:), y(:) + character(len=*) string + + include 'sfstubs.h' + + integer n + + n = size(x) + + call plstrf2c(string, string1, maxlen) + s1 = transfer( string1, s1 ) + call plstring7(n,x,y,s1) + + end subroutine + +!*********************************************************************** + subroutine plvectors_0(u, v, scale) implicit none Modified: trunk/bindings/tcl/plapi.tpl =================================================================== --- trunk/bindings/tcl/plapi.tpl 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/bindings/tcl/plapi.tpl 2010-11-22 08:22:36 UTC (rev 11348) @@ -133,7 +133,7 @@ col1 PLFLT # Configure transformation between continuous and broken-down time (and -# vice versa) for current stream. +# vice versa) for current stream. pltclcmd plconfigtime void scale PLFLT @@ -382,7 +382,7 @@ pltclcmd plgra void -# Draw gradient in polygon. +# Draw gradient in polygon. pltclcmd plgradient void n PLINT @@ -923,6 +923,14 @@ nx PLINT ny PLINT +# Plot the same string at a series of locations (x(i),y(i)) + +pltclcmd plstring void +n PLINT +x PLFLT * +y PLFLT * +string const char * + # Add data to the strip chart pltclcmd plstripa void Modified: trunk/examples/f77/x04f.fm4 =================================================================== --- trunk/examples/f77/x04f.fm4 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/examples/f77/x04f.fm4 2010-11-22 08:22:36 UTC (rev 11348) @@ -80,6 +80,7 @@ call plbox(' ', 0.0d0, 0, 'cmstv', 30.0d0, 3) call plcol0(3) call plline(101,freql,phase) + call plstring(101,freql,phase,'*') call plcol0(3) call plmtex('r', 5.0d0, 0.5d0, 0.5d0, & 'Phase shift (degrees)') Modified: trunk/examples/f95/x04f.f90 =================================================================== --- trunk/examples/f95/x04f.f90 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/examples/f95/x04f.f90 2010-11-22 08:22:36 UTC (rev 11348) @@ -77,7 +77,8 @@ call plwind(-2.0_plflt, 3.0_plflt, -100.0_plflt, 0.0_plflt) call plbox(' ', 0.0_plflt, 0, 'cmstv', 30.0_plflt, 3) call plcol0(3) - call plline(freql,phase) + call plline(freql, phase) + call plstring(freql, phase, '*') call plcol0(3) call plmtex('r', 5.0_plflt, 0.5_plflt, 0.5_plflt, & 'Phase shift (degrees)') Modified: trunk/examples/tcl/x04.tcl =================================================================== --- trunk/examples/tcl/x04.tcl 2010-11-22 08:20:55 UTC (rev 11347) +++ trunk/examples/tcl/x04.tcl 2010-11-22 08:22:36 UTC (rev 11348) @@ -63,6 +63,7 @@ $w cmd plbox "" 0.0 0 "cmstv" 30.0 3 $w cmd plcol0 3 $w cmd plline 101 freql phase + $w cmd plstring 101 freql phase "*" $w cmd plcol0 3 $w cmd plmtex "r" 5.0 0.5 0.5 "Phase shift (degrees)" } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |