|
From: <arj...@us...> - 2013-12-09 19:33:56
|
Revision: 12836
http://sourceforge.net/p/plplot/code/12836
Author: arjenmarkus
Date: 2013-12-09 19:33:53 +0000 (Mon, 09 Dec 2013)
Log Message:
-----------
Add the "rectangular" argument to all variants of plshades. It may not be useful in some cases, but it does not hurt and restores the symmetry.
Note: plshades_multiple_tr now uses a default "rectangular" option of 0 - previously it was 1, but I think that was a mistake, as in most cases the transformation of the coordinates will not result in rectangles.
Modified Paths:
--------------
trunk/bindings/f95/plplotf95.def
trunk/bindings/f95/plplotf95_ifort.def
trunk/bindings/f95/plplotf95_mingw.def
trunk/bindings/f95/sccont.c
trunk/bindings/f95/sfstubs.f90
trunk/bindings/f95/sfstubsf95.f90
Modified: trunk/bindings/f95/plplotf95.def
===================================================================
--- trunk/bindings/f95/plplotf95.def 2013-12-09 19:18:22 UTC (rev 12835)
+++ trunk/bindings/f95/plplotf95.def 2013-12-09 19:33:53 UTC (rev 12836)
@@ -33,7 +33,9 @@
_PLPLOTP_mp_PLSHADES_MULTIPLE_1@52
_PLPLOTP_mp_PLSHADES_MULTIPLE_1R@56
_PLPLOTP_mp_PLSHADES_MULTIPLE_2@52
+ _PLPLOTP_mp_PLSHADES_MULTIPLE_2R@56
_PLPLOTP_mp_PLSHADES_MULTIPLE_TR@48
+ _PLPLOTP_mp_PLSHADES_MULTIPLE_TRR@52
_PLPLOTP_mp_PLSPAL0@8
_PLPLOTP_mp_PLSPAL1@12
_PLPLOTP_mp_PLLAB@24
Modified: trunk/bindings/f95/plplotf95_ifort.def
===================================================================
--- trunk/bindings/f95/plplotf95_ifort.def 2013-12-09 19:18:22 UTC (rev 12835)
+++ trunk/bindings/f95/plplotf95_ifort.def 2013-12-09 19:33:53 UTC (rev 12836)
@@ -33,7 +33,9 @@
PLPLOTP_mp_PLSHADES_MULTIPLE_1
PLPLOTP_mp_PLSHADES_MULTIPLE_1R
PLPLOTP_mp_PLSHADES_MULTIPLE_2
+ PLPLOTP_mp_PLSHADES_MULTIPLE_2R
PLPLOTP_mp_PLSHADES_MULTIPLE_TR
+ PLPLOTP_mp_PLSHADES_MULTIPLE_TRR
PLPLOTP_mp_PLSPAL0
PLPLOTP_mp_PLSPAL1
PLPLOTP_mp_PLLAB
Modified: trunk/bindings/f95/plplotf95_mingw.def
===================================================================
--- trunk/bindings/f95/plplotf95_mingw.def 2013-12-09 19:18:22 UTC (rev 12835)
+++ trunk/bindings/f95/plplotf95_mingw.def 2013-12-09 19:33:53 UTC (rev 12836)
@@ -40,7 +40,9 @@
__plplotp_MOD_plshades_multiple_1
__plplotp_MOD_plshades_multiple_1r
__plplotp_MOD_plshades_multiple_2
+ __plplotp_MOD_plshades_multiple_2r
__plplotp_MOD_plshades_multiple_tr
+ __plplotp_MOD_plshades_multiple_trr
__plplotp_MOD_plspal0
__plplotp_MOD_plspal1
__plplotp_MOD_plstart
Modified: trunk/bindings/f95/sccont.c
===================================================================
--- trunk/bindings/f95/sccont.c 2013-12-09 19:18:22 UTC (rev 12835)
+++ trunk/bindings/f95/sccont.c 2013-12-09 19:33:53 UTC (rev 12836)
@@ -83,11 +83,11 @@
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
PLFLT *clevel, PLINT *nlevel, PLFLT *fill_width,
PLINT *cont_color, PLFLT *cont_width,
- PLFLT *xg2, PLFLT *yg2, PLINT *lx );
+ PLFLT *xg2, PLFLT *yg2, PLINT *lx, PLINT *rect );
void PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
PLFLT *clevel, PLINT *nlevel, PLFLT *fill_width,
- PLINT *cont_color, PLFLT *cont_width, PLFLT *ftr, PLINT *lx );
+ PLINT *cont_color, PLFLT *cont_width, PLFLT *ftr, PLINT *lx, PLINT *rect );
void PLGRIDDATA( PLFLT *x, PLFLT *y, PLFLT *z, PLINT *npts, PLFLT *xg,
PLINT *nx, PLFLT *yg, PLINT *ny, PLFLT *zg, PLINT *type,
PLFLT *data );
@@ -580,17 +580,13 @@
plFree2dGrid( a, *nx, *ny );
}
-
-// Note that in this case the rectangular argument should always be 0,
-// it makes no sense to propagate it as an optional argument
void
PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ),
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
PLFLT *clevel, PLINT *nlevel, PLFLT *fill_width,
PLINT *cont_color, PLFLT *cont_width,
- PLFLT *xg2, PLFLT *yg2, PLINT *lx )
+ PLFLT *xg2, PLFLT *yg2, PLINT *lx, PLINT *rect )
{
- PLINT rect = 0;
PLFLT **a;
int i, j;
PLcGrid2 cgrid2;
@@ -615,7 +611,7 @@
*xmin, *xmax, *ymin, *ymax,
clevel, *nlevel, *fill_width,
*cont_color, *cont_width,
- c_plfill, rect, pltr2, (void *) &cgrid2 );
+ c_plfill, *rect, pltr2, (void *) &cgrid2 );
// Clean up allocated memory
plFree2dGrid( a, *nx, *ny );
@@ -627,9 +623,8 @@
PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ),
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
PLFLT *clevel, PLINT *nlevel, PLFLT *fill_width,
- PLINT *cont_color, PLFLT *cont_width, PLFLT *ftr, PLINT *lx )
+ PLINT *cont_color, PLFLT *cont_width, PLFLT *ftr, PLINT *lx, PLINT *rect )
{
- PLINT rect = 1;
PLFLT ** a;
int i, j;
@@ -647,7 +642,7 @@
*xmin, *xmax, *ymin, *ymax,
clevel, *nlevel, *fill_width,
*cont_color, *cont_width,
- c_plfill, rect, pltr, (void *) ftr );
+ c_plfill, *rect, pltr, (void *) ftr );
// Clean up memory allocated for a
plFree2dGrid( a, *nx, *ny );
Modified: trunk/bindings/f95/sfstubs.f90
===================================================================
--- trunk/bindings/f95/sfstubs.f90 2013-12-09 19:18:22 UTC (rev 12835)
+++ trunk/bindings/f95/sfstubs.f90 2013-12-09 19:33:53 UTC (rev 12836)
@@ -603,12 +603,46 @@
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, &
xg2(:,:), yg2(:,:)
+ integer rect
+
! call plstrf2c(dnam, string1)
+ rect = 0
+
s1 = transfer( string1, s1 )
call plshades27(z, size(z,1), size(z,2), s1, &
xmin, xmax, ymin, ymax, &
clevel, size(clevel), fill_width, &
+ cont_color, cont_width, xg2, yg2, size(z,1), rect)
+
+ end subroutine
+
+!***********************************************************************
+
+ subroutine plshades_multiple_2r(z, defined, &
+ xmin, xmax, ymin, ymax, &
+ clevel, fill_width, &
+ cont_color, cont_width, rectangular, xg2, yg2)
+
+ implicit none
+ character defined*(*)
+ integer cont_color
+ logical rectangular
+ real(kind=plflt)fill_width, cont_width
+ real(kind=plflt) clevel(:)
+ real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, &
+ xg2(:,:), yg2(:,:)
+
+ integer rect
+
+ rect = merge( 1, 0, rectangular )
+
+! call plstrf2c(dnam, string1)
+
+ s1 = transfer( string1, s1 )
+ call plshades27(z, size(z,1), size(z,2), s1, &
+ xmin, xmax, ymin, ymax, &
+ clevel, size(clevel), fill_width, &
cont_color, cont_width, xg2, yg2, size(z,1))
end subroutine
@@ -628,18 +662,52 @@
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax
real(kind=plflt) tr(6)
+ integer rect
+
! call plstrf2c(dnam, string1)
+ rect = 0
+
s1 = transfer( string1, s1 )
call plshades7(z, size(z,1), size(z,2), s1, &
xmin, xmax, ymin, ymax, &
clevel, size(clevel), fill_width, &
- cont_color, cont_width, tr, size(z,1))
+ cont_color, cont_width, tr, size(z,1), rect)
end subroutine
!***********************************************************************
+ subroutine plshades_multiple_trr(z, defined, &
+ xmin, xmax, ymin, ymax, &
+ clevel, fill_width, &
+ cont_color, cont_width, rectangular, tr)
+
+ implicit none
+ character defined*(*)
+ integer cont_color
+ logical rectangular
+ real(kind=plflt) fill_width, cont_width
+ real(kind=plflt) clevel(:)
+ real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax
+ real(kind=plflt) tr(6)
+
+ integer rect
+
+! call plstrf2c(dnam, string1)
+
+ rect = merge(1, 0, rectangular)
+
+ s1 = transfer( string1, s1 )
+ call plshades7(z, size(z,1), size(z,2), s1, &
+ xmin, xmax, ymin, ymax, &
+ clevel, size(clevel), fill_width, &
+ cont_color, cont_width, tr, size(z,1), rect)
+
+ end subroutine
+
+!***********************************************************************
+
subroutine plimagefr_0(z,xmin,xmax,ymin,ymax,zmin,zmax, &
valuemin,valuemax)
Modified: trunk/bindings/f95/sfstubsf95.f90
===================================================================
--- trunk/bindings/f95/sfstubsf95.f90 2013-12-09 19:18:22 UTC (rev 12835)
+++ trunk/bindings/f95/sfstubsf95.f90 2013-12-09 19:33:53 UTC (rev 12836)
@@ -112,10 +112,13 @@
module procedure plshades_multiple_1
module procedure plshades_multiple_1r
module procedure plshades_multiple_2
+ module procedure plshades_multiple_2r
module procedure plshades_multiple_tr
+ module procedure plshades_multiple_trr
end interface
- private :: plshades_multiple_0, plshades_multiple_1, &
- plshades_multiple_2, plshades_multiple_tr
+ private :: plshades_multiple_0, plshades_multiple_1, plshades_multiple_1r, &
+ plshades_multiple_2, plshades_multiple_2r, &
+ plshades_multiple_tr, plshades_multiple_trr
interface plimagefr
module procedure plimagefr_0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|