From: <ai...@us...> - 2011-01-29 23:45:58
|
Revision: 11534 http://plplot.svn.sourceforge.net/plplot/?rev=11534&view=rev Author: airwin Date: 2011-01-29 23:45:49 +0000 (Sat, 29 Jan 2011) Log Message: ----------- PL_COLORBAR_LABEL_UPPER==>PL_COLORBAR_LABEL_TOP PL_COLORBAR_LABEL_LOWER==>PL_COLORBAR_LABEL_BOTTOM PL_COLORBAR_UPPER==>PL_POSITION_TOP PL_COLORBAR_LOWER==>PL_POSITION_BOTTOM PL_COLORBAR_RIGHT==>PL_POSITION_RIGHT PL_COLORBAR_LEFT==>PL_POSITION_LEFT This mass change was done with find, xargs, grep and sed. It is largely untested since default build does not work (because of plcolorbar API change). However, if you use cmake options -DBUILD_TEST=ON -DDEFAULT_NO_BINDINGS=ON, the test_c_psc target does work. Modified Paths: -------------- trunk/bindings/f77/plplot_parameters.fm4 trunk/bindings/f95/plplot_parameters.h trunk/bindings/ocaml/plplot.mli trunk/bindings/ocaml/plplot_core.idl trunk/bindings/octave/plplot_octave_def trunk/bindings/swig-support/plplotcapi.i trunk/examples/c/x33c.c trunk/examples/c++/x33.cc trunk/examples/f77/x33f.fm4 trunk/examples/java/x33.java trunk/examples/octave/x33c.m trunk/examples/python/xw33.py trunk/include/plplot.h trunk/src/pllegend.c Modified: trunk/bindings/f77/plplot_parameters.fm4 =================================================================== --- trunk/bindings/f77/plplot_parameters.fm4 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/bindings/f77/plplot_parameters.fm4 2011-01-29 23:45:49 UTC (rev 11534) @@ -112,22 +112,22 @@ parameter (PL_LEGEND_BOUNDING_BOX = 64) integer*4 PL_LEGEND_ROW_MAJOR parameter (PL_LEGEND_ROW_MAJOR = 128) - integer*4 PL_COLORBAR_LEFT - parameter (PL_COLORBAR_LEFT = 1) - integer*4 PL_COLORBAR_RIGHT - parameter (PL_COLORBAR_RIGHT = 2) - integer*4 PL_COLORBAR_UPPER - parameter (PL_COLORBAR_UPPER = 4) - integer*4 PL_COLORBAR_LOWER - parameter (PL_COLORBAR_LOWER = 8) + integer*4 PL_POSITION_LEFT + parameter (PL_POSITION_LEFT = 1) + integer*4 PL_POSITION_RIGHT + parameter (PL_POSITION_RIGHT = 2) + integer*4 PL_POSITION_TOP + parameter (PL_POSITION_TOP = 4) + integer*4 PL_POSITION_BOTTOM + parameter (PL_POSITION_BOTTOM = 8) integer*4 PL_COLORBAR_LABEL_LEFT parameter (PL_COLORBAR_LABEL_LEFT = 16) integer*4 PL_COLORBAR_LABEL_RIGHT parameter (PL_COLORBAR_LABEL_RIGHT = 32) - integer*4 PL_COLORBAR_LABEL_UPPER - parameter (PL_COLORBAR_LABEL_UPPER = 64) - integer*4 PL_COLORBAR_LABEL_LOWER - parameter (PL_COLORBAR_LABEL_LOWER = 128) + integer*4 PL_COLORBAR_LABEL_TOP + parameter (PL_COLORBAR_LABEL_TOP = 64) + integer*4 PL_COLORBAR_LABEL_BOTTOM + parameter (PL_COLORBAR_LABEL_BOTTOM = 128) integer*4 PL_COLORBAR_IMAGE parameter (PL_COLORBAR_IMAGE = 256) integer*4 PL_COLORBAR_SHADE Modified: trunk/bindings/f95/plplot_parameters.h =================================================================== --- trunk/bindings/f95/plplot_parameters.h 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/bindings/f95/plplot_parameters.h 2011-01-29 23:45:49 UTC (rev 11534) @@ -55,14 +55,14 @@ integer, parameter :: PL_LEGEND_BACKGROUND = 32 integer, parameter :: PL_LEGEND_BOUNDING_BOX = 64 integer, parameter :: PL_LEGEND_ROW_MAJOR = 128 - integer, parameter :: PL_COLORBAR_LEFT = 1 - integer, parameter :: PL_COLORBAR_RIGHT = 2 - integer, parameter :: PL_COLORBAR_UPPER = 4 - integer, parameter :: PL_COLORBAR_LOWER = 8 + integer, parameter :: PL_POSITION_LEFT = 1 + integer, parameter :: PL_POSITION_RIGHT = 2 + integer, parameter :: PL_POSITION_TOP = 4 + integer, parameter :: PL_POSITION_BOTTOM = 8 integer, parameter :: PL_COLORBAR_LABEL_LEFT = 16 integer, parameter :: PL_COLORBAR_LABEL_RIGHT = 32 - integer, parameter :: PL_COLORBAR_LABEL_UPPER = 64 - integer, parameter :: PL_COLORBAR_LABEL_LOWER = 128 + integer, parameter :: PL_COLORBAR_LABEL_TOP = 64 + integer, parameter :: PL_COLORBAR_LABEL_BOTTOM = 128 integer, parameter :: PL_COLORBAR_IMAGE = 256 integer, parameter :: PL_COLORBAR_SHADE = 512 integer, parameter :: PL_COLORBAR_GRADIENT = 1024 Modified: trunk/bindings/ocaml/plplot.mli =================================================================== --- trunk/bindings/ocaml/plplot.mli 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/bindings/ocaml/plplot.mli 2011-01-29 23:45:49 UTC (rev 11534) @@ -572,8 +572,8 @@ and plplot_colorbar_enum = | PL_COLORBAR_LABEL_LEFT | PL_COLORBAR_LABEL_RIGHT - | PL_COLORBAR_LABEL_UPPER - | PL_COLORBAR_LABEL_LOWER + | PL_COLORBAR_LABEL_TOP + | PL_COLORBAR_LABEL_BOTTOM | PL_COLORBAR_IMAGE | PL_COLORBAR_SHADE | PL_COLORBAR_GRADIENT Modified: trunk/bindings/ocaml/plplot_core.idl =================================================================== --- trunk/bindings/ocaml/plplot_core.idl 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/bindings/ocaml/plplot_core.idl 2011-01-29 23:45:49 UTC (rev 11534) @@ -85,8 +85,8 @@ enum plplot_colorbar_enum { PL_COLORBAR_LABEL_LEFT = 1, PL_COLORBAR_LABEL_RIGHT = 2, - PL_COLORBAR_LABEL_UPPER = 4, - PL_COLORBAR_LABEL_LOWER = 8, + PL_COLORBAR_LABEL_TOP = 4, + PL_COLORBAR_LABEL_BOTTOM = 8, PL_COLORBAR_IMAGE = 16, PL_COLORBAR_SHADE = 32, PL_COLORBAR_GRADIENT = 64, Modified: trunk/bindings/octave/plplot_octave_def =================================================================== --- trunk/bindings/octave/plplot_octave_def 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/bindings/octave/plplot_octave_def 2011-01-29 23:45:49 UTC (rev 11534) @@ -108,22 +108,22 @@ PL_LEGEND_INSIDE = 4096; global PL_LEGEND_OUTSIDE PL_LEGEND_OUTSIDE = 8192; -global PL_COLORBAR_LEFT -PL_COLORBAR_LEFT = 1; -global PL_COLORBAR_RIGHT -PL_COLORBAR_RIGHT = 2; -global PL_COLORBAR_UPPER -PL_COLORBAR_UPPER = 4; -global PL_COLORBAR_LOWER -PL_COLORBAR_LOWER = 8; +global PL_POSITION_LEFT +PL_POSITION_LEFT = 1; +global PL_POSITION_RIGHT +PL_POSITION_RIGHT = 2; +global PL_POSITION_TOP +PL_POSITION_TOP = 4; +global PL_POSITION_BOTTOM +PL_POSITION_BOTTOM = 8; global PL_COLORBAR_LABEL_LEFT PL_COLORBAR_LABEL_LEFT = 16; global PL_COLORBAR_LABEL_RIGHT PL_COLORBAR_LABEL_RIGHT = 32; -global PL_COLORBAR_LABEL_UPPER -PL_COLORBAR_LABEL_UPPER = 64; -global PL_COLORBAR_LABEL_LOWER -PL_COLORBAR_LABEL_LOWER = 128; +global PL_COLORBAR_LABEL_TOP +PL_COLORBAR_LABEL_TOP = 64; +global PL_COLORBAR_LABEL_BOTTOM +PL_COLORBAR_LABEL_BOTTOM = 128; global PL_COLORBAR_IMAGE PL_COLORBAR_IMAGE = 256; global PL_COLORBAR_SHADE Modified: trunk/bindings/swig-support/plplotcapi.i =================================================================== --- trunk/bindings/swig-support/plplotcapi.i 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/bindings/swig-support/plplotcapi.i 2011-01-29 23:45:49 UTC (rev 11534) @@ -117,14 +117,14 @@ #define PL_LEGEND_ROW_MAJOR 128 // Flags for plcolorbar -#define PL_COLORBAR_LEFT 1 -#define PL_COLORBAR_RIGHT 2 -#define PL_COLORBAR_UPPER 4 -#define PL_COLORBAR_LOWER 8 +#define PL_POSITION_LEFT 1 +#define PL_POSITION_RIGHT 2 +#define PL_POSITION_TOP 4 +#define PL_POSITION_BOTTOM 8 #define PL_COLORBAR_LABEL_LEFT 16 #define PL_COLORBAR_LABEL_RIGHT 32 -#define PL_COLORBAR_LABEL_UPPER 64 -#define PL_COLORBAR_LABEL_LOWER 128 +#define PL_COLORBAR_LABEL_TOP 64 +#define PL_COLORBAR_LABEL_BOTTOM 128 #define PL_COLORBAR_IMAGE 256 #define PL_COLORBAR_SHADE 512 #define PL_COLORBAR_GRADIENT 1024 Modified: trunk/examples/c/x33c.c =================================================================== --- trunk/examples/c/x33c.c 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/examples/c/x33c.c 2011-01-29 23:45:49 UTC (rev 11534) @@ -116,7 +116,7 @@ n, colors, values ); position = PL_POSITION_TOP; - opt = bar_type | PL_COLORBAR_LABEL_UPPER | PL_COLORBAR_CAP_HIGH; + opt = bar_type | PL_COLORBAR_LABEL_TOP | PL_COLORBAR_CAP_HIGH; plcolorbar( position, opt, 0.1, 0.1, 0.5, 0.1, cont_color, cont_width, @@ -125,7 +125,7 @@ n, colors, values ); position = PL_POSITION_BOTTOM; - opt = bar_type | PL_COLORBAR_LABEL_LOWER | PL_COLORBAR_CAP_LOW; + opt = bar_type | PL_COLORBAR_LABEL_BOTTOM | PL_COLORBAR_CAP_LOW; plcolorbar( position, opt, 0.4, 0.1, 0.5, 0.1, cont_color, cont_width, @@ -206,7 +206,7 @@ n, colors, values ); position = PL_POSITION_TOP; - opt = bar_type | PL_COLORBAR_LABEL_UPPER | PL_COLORBAR_CAP_LOW; + opt = bar_type | PL_COLORBAR_LABEL_TOP | PL_COLORBAR_CAP_LOW; plcolorbar( position, opt, 0.1, 0.1, 0.5, 0.1, cont_color, cont_width, @@ -215,7 +215,7 @@ n, colors, values ); position = PL_POSITION_BOTTOM; - opt = bar_type | PL_COLORBAR_LABEL_LOWER | PL_COLORBAR_CAP_HIGH; + opt = bar_type | PL_COLORBAR_LABEL_BOTTOM | PL_COLORBAR_CAP_HIGH; plcolorbar( position, opt, 0.4, 0.1, 0.5, 0.1, cont_color, cont_width, Modified: trunk/examples/c++/x33.cc =================================================================== --- trunk/examples/c++/x33.cc 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/examples/c++/x33.cc 2011-01-29 23:45:49 UTC (rev 11534) @@ -100,7 +100,7 @@ } PLINT opt; - opt = PL_COLORBAR_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT | + opt = PL_POSITION_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT | PL_COLORBAR_CAP_HIGH; const char *axis_opts_1, *axis_opts_2; @@ -128,7 +128,7 @@ axis_opts_1, "Test label - Left, High Cap", n, colors, values ); - opt = PL_COLORBAR_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT | + opt = PL_POSITION_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT | PL_COLORBAR_CAP_LOW; pls->colorbar( opt, 0.1, 0.4, 0.5, 0.1, @@ -136,7 +136,7 @@ axis_opts_1, "Test label - Right, Low Cap", n, colors, values ); - opt = PL_COLORBAR_UPPER | bar_type | PL_COLORBAR_LABEL_UPPER | + opt = PL_POSITION_TOP | bar_type | PL_COLORBAR_LABEL_TOP | PL_COLORBAR_CAP_HIGH; pls->colorbar( opt, 0.1, 0.1, 0.5, 0.1, @@ -144,7 +144,7 @@ axis_opts_2, "Test label - Upper, High Cap", n, colors, values ); - opt = PL_COLORBAR_LOWER | bar_type | PL_COLORBAR_LABEL_LOWER | + opt = PL_POSITION_BOTTOM | bar_type | PL_COLORBAR_LABEL_BOTTOM | PL_COLORBAR_CAP_LOW; pls->colorbar( opt, 0.4, 0.1, 0.5, 0.1, @@ -174,7 +174,7 @@ } PLINT opt; - opt = PL_COLORBAR_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT | + opt = PL_POSITION_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT | PL_COLORBAR_CAP_LOW; const char *axis_opts_1, *axis_opts_2; @@ -202,7 +202,7 @@ axis_opts_1, "Test label - Left, Low Cap", n, colors, values ); - opt = PL_COLORBAR_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT | + opt = PL_POSITION_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT | PL_COLORBAR_CAP_HIGH; pls->colorbar( opt, 0.1, 0.4, 0.5, 0.1, @@ -210,7 +210,7 @@ axis_opts_1, "Test label - Right, High Cap", n, colors, values ); - opt = PL_COLORBAR_UPPER | bar_type | PL_COLORBAR_LABEL_UPPER | + opt = PL_POSITION_TOP | bar_type | PL_COLORBAR_LABEL_TOP | PL_COLORBAR_CAP_LOW; pls->colorbar( opt, 0.1, 0.1, 0.5, 0.1, @@ -218,7 +218,7 @@ axis_opts_2, "Test label - Upper, Low Cap", n, colors, values ); - opt = PL_COLORBAR_LOWER | bar_type | PL_COLORBAR_LABEL_LOWER | + opt = PL_POSITION_BOTTOM | bar_type | PL_COLORBAR_LABEL_BOTTOM | PL_COLORBAR_CAP_HIGH; pls->colorbar( opt, 0.4, 0.1, 0.5, 0.1, Modified: trunk/examples/f77/x33f.fm4 =================================================================== --- trunk/examples/f77/x33f.fm4 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/examples/f77/x33f.fm4 2011-01-29 23:45:49 UTC (rev 11534) @@ -695,7 +695,7 @@ } integer opt - opt = PL_COLORBAR_LEFT + bar_type + PL_COLORBAR_LABEL_LEFT + + opt = PL_POSITION_LEFT + bar_type + PL_COLORBAR_LABEL_LEFT + & PL_COLORBAR_CAP_HIGH const char *axis_opts_1, *axis_opts_2 @@ -723,7 +723,7 @@ & axis_opts_1, 'Test label - Left, High Cap', & n, colors, values ) - opt = PL_COLORBAR_RIGHT + bar_type + PL_COLORBAR_LABEL_RIGHT + + opt = PL_POSITION_RIGHT + bar_type + PL_COLORBAR_LABEL_RIGHT + PL_COLORBAR_CAP_LOW call plcolorbar( opt, 0.1d0, 0.4d0, 0.5d0, 0.1d0, @@ -731,7 +731,7 @@ & axis_opts_1, 'Test label - Right, Low Cap', & n, colors, values ) - opt = PL_COLORBAR_UPPER + bar_type + PL_COLORBAR_LABEL_UPPER + + opt = PL_POSITION_TOP + bar_type + PL_COLORBAR_LABEL_TOP + & PL_COLORBAR_CAP_HIGH call plcolorbar( opt, 0.1d0, 0.1d0, 0.5d0, 0.1d0, @@ -739,7 +739,7 @@ & axis_opts_2, 'Test label - Upper, High Cap', & n, colors, values ) - opt = PL_COLORBAR_LOWER + bar_type + PL_COLORBAR_LABEL_LOWER + + opt = PL_POSITION_BOTTOM + bar_type + PL_COLORBAR_LABEL_BOTTOM + & PL_COLORBAR_CAP_LOW call plcolorbar( opt, 0.4d0, 0.1d0, 0.5d0, 0.1d0, @@ -769,7 +769,7 @@ } integer opt - opt = PL_COLORBAR_LEFT + bar_type + PL_COLORBAR_LABEL_LEFT + + opt = PL_POSITION_LEFT + bar_type + PL_COLORBAR_LABEL_LEFT + PL_COLORBAR_CAP_LOW const char *axis_opts_1, *axis_opts_2 @@ -797,7 +797,7 @@ axis_opts_1, 'Test label - Left, Low Cap', n, colors, values ) - opt = PL_COLORBAR_RIGHT + bar_type + PL_COLORBAR_LABEL_RIGHT + + opt = PL_POSITION_RIGHT + bar_type + PL_COLORBAR_LABEL_RIGHT + PL_COLORBAR_CAP_HIGH call plcolorbar( opt, 0.1d0, 0.4d0, 0.5d0, 0.1d0, @@ -805,7 +805,7 @@ axis_opts_1, 'Test label - Right, High Cap', n, colors, values ) - opt = PL_COLORBAR_UPPER + bar_type + PL_COLORBAR_LABEL_UPPER + + opt = PL_POSITION_TOP + bar_type + PL_COLORBAR_LABEL_TOP + PL_COLORBAR_CAP_LOW call plcolorbar( opt, 0.1d0, 0.1d0, 0.5d0, 0.1d0, @@ -813,7 +813,7 @@ axis_opts_2, 'Test label - Upper, Low Cap', n, colors, values ) - opt = PL_COLORBAR_LOWER + bar_type + PL_COLORBAR_LABEL_LOWER + + opt = PL_POSITION_BOTTOM + bar_type + PL_COLORBAR_LABEL_BOTTOM + PL_COLORBAR_CAP_HIGH call plcolorbar( opt, 0.4d0, 0.1d0, 0.5d0, 0.1d0, Modified: trunk/examples/java/x33.java =================================================================== --- trunk/examples/java/x33.java 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/examples/java/x33.java 2011-01-29 23:45:49 UTC (rev 11534) @@ -71,7 +71,7 @@ } int opt; - opt = PLStream.PL_COLORBAR_LEFT | bar_type | PLStream.PL_COLORBAR_LABEL_LEFT | + opt = PLStream.PL_POSITION_LEFT | bar_type | PLStream.PL_COLORBAR_LABEL_LEFT | PLStream.PL_COLORBAR_CAP_HIGH; String axis_opts_1, axis_opts_2; @@ -99,7 +99,7 @@ axis_opts_1, "Test label - Left, High Cap", colors, values ); - opt = PLStream.PL_COLORBAR_RIGHT | bar_type | PLStream.PL_COLORBAR_LABEL_RIGHT | + opt = PLStream.PL_POSITION_RIGHT | bar_type | PLStream.PL_COLORBAR_LABEL_RIGHT | PLStream.PL_COLORBAR_CAP_LOW; pls.colorbar( opt, 0.1, 0.4, 0.5, 0.1, @@ -107,7 +107,7 @@ axis_opts_1, "Test label - Right, Low Cap", colors, values ); - opt = PLStream.PL_COLORBAR_UPPER | bar_type | PLStream.PL_COLORBAR_LABEL_UPPER | + opt = PLStream.PL_POSITION_TOP | bar_type | PLStream.PL_COLORBAR_LABEL_TOP | PLStream.PL_COLORBAR_CAP_HIGH; pls.colorbar( opt, 0.1, 0.1, 0.5, 0.1, @@ -115,7 +115,7 @@ axis_opts_2, "Test label - Upper, High Cap", colors, values ); - opt = PLStream.PL_COLORBAR_LOWER | bar_type | PLStream.PL_COLORBAR_LABEL_LOWER | + opt = PLStream.PL_POSITION_BOTTOM | bar_type | PLStream.PL_COLORBAR_LABEL_BOTTOM | PLStream.PL_COLORBAR_CAP_LOW; pls.colorbar( opt, 0.4, 0.1, 0.5, 0.1, @@ -144,7 +144,7 @@ } int opt; - opt = PLStream.PL_COLORBAR_LEFT | bar_type | PLStream.PL_COLORBAR_LABEL_LEFT | + opt = PLStream.PL_POSITION_LEFT | bar_type | PLStream.PL_COLORBAR_LABEL_LEFT | PLStream.PL_COLORBAR_CAP_LOW; String axis_opts_1, axis_opts_2; @@ -172,7 +172,7 @@ axis_opts_1, "Test label - Left, Low Cap", colors, values ); - opt = PLStream.PL_COLORBAR_RIGHT | bar_type | PLStream.PL_COLORBAR_LABEL_RIGHT | + opt = PLStream.PL_POSITION_RIGHT | bar_type | PLStream.PL_COLORBAR_LABEL_RIGHT | PLStream.PL_COLORBAR_CAP_HIGH; pls.colorbar( opt, 0.1, 0.4, 0.5, 0.1, @@ -180,7 +180,7 @@ axis_opts_1, "Test label - Right, High Cap", colors, values ); - opt = PLStream.PL_COLORBAR_UPPER | bar_type | PLStream.PL_COLORBAR_LABEL_UPPER | + opt = PLStream.PL_POSITION_TOP | bar_type | PLStream.PL_COLORBAR_LABEL_TOP | PLStream.PL_COLORBAR_CAP_LOW; pls.colorbar( opt, 0.1, 0.1, 0.5, 0.1, @@ -188,7 +188,7 @@ axis_opts_2, "Test label - Upper, Low Cap", colors, values ); - opt = PLStream.PL_COLORBAR_LOWER | bar_type | PLStream.PL_COLORBAR_LABEL_LOWER | + opt = PLStream.PL_POSITION_BOTTOM | bar_type | PLStream.PL_COLORBAR_LABEL_BOTTOM | PLStream.PL_COLORBAR_CAP_HIGH; pls.colorbar( opt, 0.4, 0.1, 0.5, 0.1, Modified: trunk/examples/octave/x33c.m =================================================================== --- trunk/examples/octave/x33c.m 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/examples/octave/x33c.m 2011-01-29 23:45:49 UTC (rev 11534) @@ -59,7 +59,7 @@ ]; function plcolorbar_example_1( bar_type, ticks, sub_ticks, values, title ) - global PL_COLORBAR_LEFT PL_COLORBAR_LABEL_LEFT PL_COLORBAR_CAP_HIGH PL_COLORBAR_SHADE_LABEL PL_COLORBAR_RIGHT PL_COLORBAR_LABEL_RIGHT PL_COLORBAR_CAP_LOW PL_COLORBAR_UPPER PL_COLORBAR_LABEL_UPPER PL_COLORBAR_CAP_HIGH PL_COLORBAR_LOWER PL_COLORBAR_LABEL_LOWER PL_COLORBAR_CAP_LOW + global PL_POSITION_LEFT PL_COLORBAR_LABEL_LEFT PL_COLORBAR_CAP_HIGH PL_COLORBAR_SHADE_LABEL PL_POSITION_RIGHT PL_COLORBAR_LABEL_RIGHT PL_COLORBAR_CAP_LOW PL_POSITION_TOP PL_COLORBAR_LABEL_TOP PL_COLORBAR_CAP_HIGH PL_POSITION_BOTTOM PL_COLORBAR_LABEL_BOTTOM PL_COLORBAR_CAP_LOW pladv( 0 ); ## Setup color palette 1 plspal1( "cmap1_blue_red.pal", 1 ); @@ -68,7 +68,7 @@ color_step = 1.0 / (n - 1); colors = (0:n-1)'*color_step; - opt = bitor(PL_COLORBAR_LEFT, bitor(bar_type, bitor(PL_COLORBAR_LABEL_LEFT, PL_COLORBAR_CAP_HIGH))); + opt = bitor(PL_POSITION_LEFT, bitor(bar_type, bitor(PL_COLORBAR_LABEL_LEFT, PL_COLORBAR_CAP_HIGH))); if (bitand(bar_type, PL_COLORBAR_SHADE_LABEL)) axis_opts_1 = "iv"; @@ -88,21 +88,21 @@ axis_opts_1, "Test label - Left, High Cap", colors, values ); - opt = bitor(PL_COLORBAR_RIGHT, bitor(bar_type, bitor(PL_COLORBAR_LABEL_RIGHT, PL_COLORBAR_CAP_LOW))); + opt = bitor(PL_POSITION_RIGHT, bitor(bar_type, bitor(PL_COLORBAR_LABEL_RIGHT, PL_COLORBAR_CAP_LOW))); plcolorbar( opt, 0.1, 0.4, 0.5, 0.1, ticks, sub_ticks, axis_opts_1, "Test label - Right, Low Cap", colors, values ); - opt = bitor(PL_COLORBAR_UPPER, bitor(bar_type, bitor(PL_COLORBAR_LABEL_UPPER, PL_COLORBAR_CAP_HIGH))); + opt = bitor(PL_POSITION_TOP, bitor(bar_type, bitor(PL_COLORBAR_LABEL_TOP, PL_COLORBAR_CAP_HIGH))); plcolorbar( opt, 0.1, 0.1, 0.5, 0.1, ticks, sub_ticks, axis_opts_2, "Test label - Upper, High Cap", colors, values ); - opt = bitor(PL_COLORBAR_LOWER, bitor(bar_type, bitor(PL_COLORBAR_LABEL_LOWER, PL_COLORBAR_CAP_LOW))); + opt = bitor(PL_POSITION_BOTTOM, bitor(bar_type, bitor(PL_COLORBAR_LABEL_BOTTOM, PL_COLORBAR_CAP_LOW))); plcolorbar( opt, 0.4, 0.1, 0.5, 0.1, ticks, sub_ticks, @@ -115,7 +115,7 @@ endfunction function plcolorbar_example_2( bar_type, ticks, sub_ticks, values, title ) - global PL_COLORBAR_LEFT PL_COLORBAR_LABEL_LEFT PL_COLORBAR_CAP_HIGH PL_COLORBAR_SHADE_LABEL PL_COLORBAR_RIGHT PL_COLORBAR_LABEL_RIGHT PL_COLORBAR_CAP_LOW PL_COLORBAR_UPPER PL_COLORBAR_LABEL_UPPER PL_COLORBAR_CAP_HIGH PL_COLORBAR_LOWER PL_COLORBAR_LABEL_LOWER PL_COLORBAR_CAP_LOW + global PL_POSITION_LEFT PL_COLORBAR_LABEL_LEFT PL_COLORBAR_CAP_HIGH PL_COLORBAR_SHADE_LABEL PL_POSITION_RIGHT PL_COLORBAR_LABEL_RIGHT PL_COLORBAR_CAP_LOW PL_POSITION_TOP PL_COLORBAR_LABEL_TOP PL_COLORBAR_CAP_HIGH PL_POSITION_BOTTOM PL_COLORBAR_LABEL_BOTTOM PL_COLORBAR_CAP_LOW pladv( 0 ); ## Setup color palette 1 plspal1( "cmap1_blue_yellow.pal", 1 ); @@ -123,7 +123,7 @@ n = length(values); color_step = 1.0 / (n - 1); colors = (0:n-1)'*color_step; - opt = bitor(PL_COLORBAR_LEFT, bitor(bar_type, bitor(PL_COLORBAR_LABEL_LEFT, PL_COLORBAR_CAP_LOW))); + opt = bitor(PL_POSITION_LEFT, bitor(bar_type, bitor(PL_COLORBAR_LABEL_LEFT, PL_COLORBAR_CAP_LOW))); if (bar_type == PL_COLORBAR_SHADE_LABEL) axis_opts_1 = ""; @@ -143,21 +143,21 @@ axis_opts_1, "Test label - Left, Low Cap", colors, values ); - opt = bitor(PL_COLORBAR_RIGHT, bitor(bar_type, bitor(PL_COLORBAR_LABEL_RIGHT, PL_COLORBAR_CAP_HIGH))); + opt = bitor(PL_POSITION_RIGHT, bitor(bar_type, bitor(PL_COLORBAR_LABEL_RIGHT, PL_COLORBAR_CAP_HIGH))); plcolorbar( opt, 0.1, 0.4, 0.5, 0.1, ticks, sub_ticks, axis_opts_1, "Test label - Right, High Cap", colors, values ); - opt = bitor(PL_COLORBAR_UPPER, bitor(bar_type, bitor(PL_COLORBAR_LABEL_UPPER, PL_COLORBAR_CAP_LOW))); + opt = bitor(PL_POSITION_TOP, bitor(bar_type, bitor(PL_COLORBAR_LABEL_TOP, PL_COLORBAR_CAP_LOW))); plcolorbar( opt, 0.1, 0.1, 0.5, 0.1, ticks, sub_ticks, axis_opts_2, "Test label - Upper, Low Cap", colors, values ); - opt = bitor(PL_COLORBAR_LOWER, bitor(bar_type, bitor(PL_COLORBAR_LABEL_LOWER, PL_COLORBAR_CAP_HIGH))); + opt = bitor(PL_POSITION_BOTTOM, bitor(bar_type, bitor(PL_COLORBAR_LABEL_BOTTOM, PL_COLORBAR_CAP_HIGH))); plcolorbar( opt, 0.4, 0.1, 0.5, 0.1, ticks, sub_ticks, Modified: trunk/examples/python/xw33.py =================================================================== --- trunk/examples/python/xw33.py 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/examples/python/xw33.py 2011-01-29 23:45:49 UTC (rev 11534) @@ -66,7 +66,7 @@ color_step = 1.0 / float(n - 1) colors = color_step*arange(n) - opt = PL_COLORBAR_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT | PL_COLORBAR_CAP_HIGH + opt = PL_POSITION_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT | PL_COLORBAR_CAP_HIGH if bar_type & PL_COLORBAR_SHADE_LABEL: axis_opts_1 = "iv" @@ -84,21 +84,21 @@ axis_opts_1, "Test label - Left, High Cap", colors, values ) - opt = PL_COLORBAR_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT | PL_COLORBAR_CAP_LOW + opt = PL_POSITION_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT | PL_COLORBAR_CAP_LOW plcolorbar( opt, 0.1, 0.4, 0.5, 0.1, ticks, sub_ticks, axis_opts_1, "Test label - Right, Low Cap", colors, values ) - opt = PL_COLORBAR_UPPER | bar_type | PL_COLORBAR_LABEL_UPPER | PL_COLORBAR_CAP_HIGH + opt = PL_POSITION_TOP | bar_type | PL_COLORBAR_LABEL_TOP | PL_COLORBAR_CAP_HIGH plcolorbar( opt, 0.1, 0.1, 0.5, 0.1, ticks, sub_ticks, axis_opts_2, "Test label - Upper, High Cap", colors, values ) - opt = PL_COLORBAR_LOWER | bar_type | PL_COLORBAR_LABEL_LOWER | PL_COLORBAR_CAP_LOW + opt = PL_POSITION_BOTTOM | bar_type | PL_COLORBAR_LABEL_BOTTOM | PL_COLORBAR_CAP_LOW plcolorbar( opt, 0.4, 0.1, 0.5, 0.1, ticks, sub_ticks, @@ -117,7 +117,7 @@ n = len(values) color_step = 1.0 / float(n - 1) colors = color_step*arange(n) - opt = PL_COLORBAR_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT | PL_COLORBAR_CAP_LOW + opt = PL_POSITION_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT | PL_COLORBAR_CAP_LOW if bar_type == PL_COLORBAR_SHADE_LABEL: axis_opts_1 = "" @@ -135,21 +135,21 @@ axis_opts_1, "Test label - Left, Low Cap", colors, values ) - opt = PL_COLORBAR_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT | PL_COLORBAR_CAP_HIGH + opt = PL_POSITION_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT | PL_COLORBAR_CAP_HIGH plcolorbar( opt, 0.1, 0.4, 0.5, 0.1, ticks, sub_ticks, axis_opts_1, "Test label - Right, High Cap", colors, values ) - opt = PL_COLORBAR_UPPER | bar_type | PL_COLORBAR_LABEL_UPPER | PL_COLORBAR_CAP_LOW + opt = PL_POSITION_TOP | bar_type | PL_COLORBAR_LABEL_TOP | PL_COLORBAR_CAP_LOW plcolorbar( opt, 0.1, 0.1, 0.5, 0.1, ticks, sub_ticks, axis_opts_2, "Test label - Upper, Low Cap", colors, values ) - opt = PL_COLORBAR_LOWER | bar_type | PL_COLORBAR_LABEL_LOWER | PL_COLORBAR_CAP_HIGH + opt = PL_POSITION_BOTTOM | bar_type | PL_COLORBAR_LABEL_BOTTOM | PL_COLORBAR_CAP_HIGH plcolorbar( opt, 0.4, 0.1, 0.5, 0.1, ticks, sub_ticks, Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/include/plplot.h 2011-01-29 23:45:49 UTC (rev 11534) @@ -1232,8 +1232,8 @@ // Flags for plcolorbar #define PL_COLORBAR_LABEL_LEFT 1 #define PL_COLORBAR_LABEL_RIGHT 2 -#define PL_COLORBAR_LABEL_UPPER 4 -#define PL_COLORBAR_LABEL_LOWER 8 +#define PL_COLORBAR_LABEL_TOP 4 +#define PL_COLORBAR_LABEL_BOTTOM 8 #define PL_COLORBAR_IMAGE 16 #define PL_COLORBAR_SHADE 32 #define PL_COLORBAR_GRADIENT 64 Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2011-01-29 22:30:37 UTC (rev 11533) +++ trunk/src/pllegend.c 2011-01-29 23:45:49 UTC (rev 11534) @@ -1231,7 +1231,7 @@ // Add an extra offset for the label so it does not bump in to the // cap. if ( ( ( position & PL_POSITION_LEFT || position & PL_POSITION_RIGHT ) && - opt & PL_COLORBAR_LABEL_LOWER ) || + opt & PL_COLORBAR_LABEL_BOTTOM ) || ( ( position & PL_POSITION_TOP || position & PL_POSITION_BOTTOM ) && opt & PL_COLORBAR_LABEL_LEFT ) ) { @@ -1245,7 +1245,7 @@ // Add an extra offset for the label so it does not bump in to the // cap. if ( ( ( position & PL_POSITION_LEFT || position & PL_POSITION_RIGHT ) && - opt & PL_COLORBAR_LABEL_UPPER ) || + opt & PL_COLORBAR_LABEL_TOP ) || ( ( position & PL_POSITION_TOP || position & PL_POSITION_BOTTOM ) && opt & PL_COLORBAR_LABEL_RIGHT ) ) { @@ -1300,7 +1300,7 @@ snprintf( opt_string, max_opts, "r%c", perp ); plmtex( opt_string, label_offset, 0.5, 0.5, label ); } - else if ( opt & PL_COLORBAR_LABEL_UPPER ) + else if ( opt & PL_COLORBAR_LABEL_TOP ) { if ( position & PL_POSITION_RIGHT || position & PL_POSITION_LEFT ) { @@ -1315,7 +1315,7 @@ snprintf( opt_string, max_opts, "t%c", perp ); plmtex( opt_string, label_offset, 0.5, 0.5, label ); } - else if ( opt & PL_COLORBAR_LABEL_LOWER ) + else if ( opt & PL_COLORBAR_LABEL_BOTTOM ) { if ( position & PL_POSITION_RIGHT || position & PL_POSITION_LEFT ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |