From: <hez...@us...> - 2011-04-17 22:02:32
|
Revision: 11712 http://plplot.svn.sourceforge.net/plplot/?rev=11712&view=rev Author: hezekiahcarty Date: 2011-04-17 22:02:25 +0000 (Sun, 17 Apr 2011) Log Message: ----------- Don't set text or tick size in plcolorbar; Update C example 33 to match Users may want smaller or larger text for colorbar labels and shorter or longer ticks so leave that choice to them. Modified Paths: -------------- trunk/examples/c/x33c.c trunk/src/pllegend.c Modified: trunk/examples/c/x33c.c =================================================================== --- trunk/examples/c/x33c.c 2011-04-17 22:01:53 UTC (rev 11711) +++ trunk/examples/c/x33c.c 2011-04-17 22:02:25 UTC (rev 11712) @@ -224,6 +224,12 @@ colorbar_position_option_labels[position_i], colorbar_label_option_labels[label_i] ); + // Smaller text + plschr( 0.0, 0.75 ); + // Small ticks on the vertical axis + plsmaj( 0.0, 0.5 ); + plsmin( 0.0, 0.5 ); + plcolorbar( position, opt, x, y, length, width, low_cap_color, high_cap_color, @@ -231,6 +237,11 @@ ticks, sub_ticks, axis_opts, label, n_values, values ); + + // Reset text and tick sizes + plschr( 0.0, 1.0 ); + plsmaj( 0.0, 1.0 ); + plsmin( 0.0, 1.0 ); } // Draw a page title Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2011-04-17 22:01:53 UTC (rev 11711) +++ trunk/src/pllegend.c 2011-04-17 22:02:25 UTC (rev 11712) @@ -1084,10 +1084,6 @@ // Active attributes to be saved and restored afterward. PLINT col0_save = plsc->icol0; - PLFLT text_scale_save = plsc->chrht / plsc->chrdef; - // Axis tick spacing - PLFLT maj_save = plsc->majht / plsc->majdef; - PLFLT min_save = plsc->minht / plsc->mindef; // Position of the color bar in normalized viewport (= normalized subpage // coordinates). @@ -1376,12 +1372,6 @@ } } - // Smaller text - plschr( 0.0, 0.75 ); - // Small ticks on the vertical axis - plsmaj( 0.0, 0.5 ); - plsmin( 0.0, 0.5 ); - // For building axis option string PLINT max_opts = 25; char opt_string[max_opts]; @@ -1521,9 +1511,6 @@ plcol0( col0_save ); plvpor( xdmin_save, xdmax_save, ydmin_save, ydmax_save ); plwind( xwmin_save, xwmax_save, ywmin_save, ywmax_save ); - plsmaj( 0.0, maj_save ); - plsmin( 0.0, min_save ); - plschr( 0.0, text_scale_save ); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |