From: <and...@us...> - 2012-10-25 17:36:13
|
Revision: 12256 http://plplot.svn.sourceforge.net/plplot/?rev=12256&view=rev Author: andrewross Date: 2012-10-25 17:36:06 +0000 (Thu, 25 Oct 2012) Log Message: ----------- Fix up C example 33 and the C++ bindings and example 16 following changes to colorbar API. Modified Paths: -------------- trunk/bindings/c++/plstream.cc trunk/bindings/c++/plstream.h trunk/examples/c/x33c.c trunk/examples/c++/x16.cc Modified: trunk/bindings/c++/plstream.cc =================================================================== --- trunk/bindings/c++/plstream.cc 2012-10-25 01:35:24 UTC (rev 12255) +++ trunk/bindings/c++/plstream.cc 2012-10-25 17:36:06 UTC (rev 12256) @@ -1019,9 +1019,9 @@ PLINT bg_color, PLINT bb_color, PLINT bb_style, PLFLT low_cap_color, PLFLT high_cap_color, PLINT cont_color, PLINT cont_width, - PLFLT ticks, PLINT sub_ticks, PLINT n_labels, PLINT *label_opts, const char *label[], PLINT n_axes, const char *axis_opts[], + PLFLT *ticks, PLINT *sub_ticks, PLINT *n_values, const PLFLT * const *values ) { set_stream(); @@ -1029,8 +1029,8 @@ plcolorbar( p_colorbar_width, p_colorbar_height, opt, position, x, y, x_length, y_length, bg_color, bb_color, bb_style, low_cap_color, high_cap_color, cont_color, cont_width, - ticks, sub_ticks, n_labels, label_opts, label, - n_axes, axis_opts, n_values, values ); + n_labels, label_opts, label,n_axes, axis_opts, + ticks, sub_ticks, n_values, values ); } Modified: trunk/bindings/c++/plstream.h =================================================================== --- trunk/bindings/c++/plstream.h 2012-10-25 01:35:24 UTC (rev 12255) +++ trunk/bindings/c++/plstream.h 2012-10-25 17:36:06 UTC (rev 12256) @@ -448,9 +448,9 @@ PLINT bg_color, PLINT bb_color, PLINT bb_style, PLFLT low_cap_color, PLFLT high_cap_color, PLINT cont_color, PLINT cont_width, - PLFLT ticks, PLINT sub_ticks, PLINT n_labels, PLINT *label_opts, const char *label[], PLINT n_axes, const char *axis_opts[], + PLFLT *ticks, PLINT *sub_ticks, PLINT *n_values, const PLFLT * const *values ); // Sets position of the light source Modified: trunk/examples/c/x33c.c =================================================================== --- trunk/examples/c/x33c.c 2012-10-25 01:35:24 UTC (rev 12255) +++ trunk/examples/c/x33c.c 2012-10-25 17:36:06 UTC (rev 12256) @@ -156,8 +156,8 @@ // Parameters for the colorbars on this page PLINT position_i, position, opt; PLFLT x, y, x_length, y_length; - PLFLT ticks; - PLINT sub_ticks; + PLFLT ticks[1] = { 0.0 }; + PLINT sub_ticks[1] = { 0 }; PLFLT low_cap_color, high_cap_color; PLINT vertical, ifn; PLINT n_axes = 1; @@ -175,9 +175,6 @@ n_values_array[0] = n_values; values_array[0] = values; - ticks = 0.0; - sub_ticks = 0; - low_cap_color = 0.0; high_cap_color = 1.0; @@ -260,9 +257,9 @@ 15, 1, 1, low_cap_color, high_cap_color, cont_color, cont_width, - ticks, sub_ticks, n_labels, label_opts, (const char **) &label, n_axes, axis_opts, + ticks, sub_ticks, n_values_array, (const PLFLT * const *) values_array ); // Reset text and tick sizes Modified: trunk/examples/c++/x16.cc =================================================================== --- trunk/examples/c++/x16.cc 2012-10-25 01:35:24 UTC (rev 12255) +++ trunk/examples/c++/x16.cc 2012-10-25 17:36:06 UTC (rev 12256) @@ -161,6 +161,12 @@ }; PLINT num_values[NUM_AXES]; PLFLT *values[NUM_AXES]; + PLFLT axis_ticks[NUM_AXES] = { + 0.0, + }; + PLINT axis_subticks[NUM_AXES] = { + 0, + }; PLFLT filler_values[2] = { 0.0, 1.0 }; #define NUM_LABELS 1 PLINT n_labels = NUM_LABELS; @@ -272,9 +278,10 @@ pls->colorbar( &colorbar_width, &colorbar_height, PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, - cont_color, cont_width, 0.0, 0, + cont_color, cont_width, n_labels, label_opts, labels, n_axis_opts, axis_opts, + axis_ticks, axis_subticks, num_values, (const PLFLT * const *) values ); // Reset text and tick sizes @@ -318,9 +325,10 @@ pls->colorbar( &colorbar_width, &colorbar_height, PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, - cont_color, cont_width, 0.0, 0, + cont_color, cont_width, n_labels, label_opts, labels, n_axis_opts, axis_opts, + axis_ticks, axis_subticks, num_values, (const PLFLT * const *) values ); // Reset text and tick sizes @@ -365,9 +373,10 @@ pls->colorbar( &colorbar_width, &colorbar_height, PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, - cont_color, cont_width, 0.0, 0, + cont_color, cont_width, n_labels, label_opts, labels, n_axis_opts, axis_opts, + axis_ticks, axis_subticks, num_values, (const PLFLT * const *) values ); // Reset text and tick sizes @@ -413,9 +422,10 @@ pls->colorbar( &colorbar_width, &colorbar_height, PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, - 2, 3, 0.0, 0, + 2, 3, n_labels, label_opts, labels, n_axis_opts, axis_opts, + axis_ticks, axis_subticks, num_values, (const PLFLT * const *) values ); // Reset text and tick sizes @@ -507,9 +517,10 @@ pls->colorbar( &colorbar_width, &colorbar_height, PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, - cont_color, cont_width, 0.0, 0, + cont_color, cont_width, n_labels, label_opts, labels, n_axis_opts, axis_opts, + axis_ticks, axis_subticks, num_values, (const PLFLT * const *) values ); // Reset text and tick sizes This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |