From: <ai...@us...> - 2011-05-01 19:27:27
|
Revision: 11739 http://plplot.svn.sourceforge.net/plplot/?rev=11739&view=rev Author: airwin Date: 2011-05-01 19:27:20 +0000 (Sun, 01 May 2011) Log Message: ----------- Add "u" (exactly like "b" except don't draw edge line) and "w" (exactly like "c" except don't draw edge line) options for xopt and yopt. These new "u" and "w" options are especially useful for plcolorbar where often the user does not want an edge line. Modified Paths: -------------- trunk/doc/docbook/src/api.xml trunk/src/plbox.c Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2011-05-01 19:14:40 UTC (rev 11738) +++ trunk/doc/docbook/src/api.xml 2011-05-01 19:27:20 UTC (rev 11739) @@ -1060,6 +1060,16 @@ <literal>t</literal>: Draws major ticks. </para> </listitem> + <listitem> + <para> + <literal>u</literal>: Exactly like "b" except don't draw edge line. + </para> + </listitem> + <listitem> + <para> + <literal>w</literal>: Exactly like "c" except don't draw edge line. + </para> + </listitem> </itemizedlist> </para> </listitem> @@ -6300,7 +6310,7 @@ <sect1 id="pllegend" renderas="sect3"> <title> - <function>pllegend</function>: Plot legend using discretely annotated filled boxes, lines, and/or symbols + <function>pllegend</function>: Plot legend using discretely annotated filled boxes, lines, and/or lines of symbols </title> <para> Modified: trunk/src/plbox.c =================================================================== --- trunk/src/plbox.c 2011-05-01 19:14:40 UTC (rev 11738) +++ trunk/src/plbox.c 2011-05-01 19:27:20 UTC (rev 11739) @@ -93,8 +93,8 @@ // xopt and yopt are character strings which define the box as follows: // // a: Draw axis (X is horizontal line Y=0, Y is vertical line X=0) -// b: Draw bottom (X) or left (Y) edge of frame -// c: Draw top (X) or right (Y) edge of frame +// b: Draw bottom (X) or left (Y) frame of box +// c: Draw top (X) or right (Y) frame of box // d: Interpret axis as a date/time when writing labels // f: Always use fixed point numeric labels // g: Draws a grid at the major tick interval @@ -106,6 +106,8 @@ // o: Label text is generated by a user-defined function // t: Draw major tick marks // s: Draw minor tick marks +// u: like b except exclude drawing the edge. +// w: like c except exclude drawing the edge. // v: (for Y only) Label vertically // // xtick, ytick are the major tick intervals required, zero for @@ -120,8 +122,8 @@ const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub ) { - PLBOOL lax, lbx, lcx, ldx, lgx, lix, llx, lsx, ltx; - PLBOOL lay, lby, lcy, ldy, lgy, liy, lly, lsy, lty; + PLBOOL lax, lbx, lcx, ldx, lgx, lix, llx, lsx, ltx, lux, lwx; + PLBOOL lay, lBy, lby, lCy, lcy, ldy, lgy, liy, lly, lsy, lty, luy, lwy; PLINT xmajor, xminor, ymajor, yminor; PLINT i, i1x, i2x, i3x, i4x, i1y, i2y, i3y, i4y; PLINT nxsub1, nysub1; @@ -166,6 +168,8 @@ llx = plP_stsearch( xopt, 'l' ); lsx = plP_stsearch( xopt, 's' ); ltx = plP_stsearch( xopt, 't' ); + lux = plP_stsearch( xopt, 'u' ); + lwx = plP_stsearch( xopt, 'w' ); lay = plP_stsearch( yopt, 'a' ); lby = plP_stsearch( yopt, 'b' ); @@ -176,6 +180,8 @@ lly = plP_stsearch( yopt, 'l' ); lsy = plP_stsearch( yopt, 's' ); lty = plP_stsearch( yopt, 't' ); + luy = plP_stsearch( xopt, 'u' ); + lwy = plP_stsearch( xopt, 'w' ); // Tick and subtick sizes in device coords @@ -241,12 +247,15 @@ i4y = ymajor; } -// Draw the bottom edge of the box +// Draw the bottom frame of the box - if ( lbx ) + if ( lbx || lux ) { - plP_movphy( vppxmi, vppymi ); - plP_draphy( vppxma, vppymi ); + if ( lbx ) + { + plP_movphy( vppxmi, vppymi ); + plP_draphy( vppxma, vppymi ); + } if ( ltx ) { if ( ldx ) @@ -288,12 +297,15 @@ } } -// Draw right-hand edge of box +// Draw right-hand frame of box - if ( lcy ) + if ( lcy || lwy ) { - plP_movphy( vppxma, vppymi ); - plP_draphy( vppxma, vppyma ); + if ( lcy ) + { + plP_movphy( vppxma, vppymi ); + plP_draphy( vppxma, vppyma ); + } if ( lty ) { if ( ldy ) @@ -335,12 +347,15 @@ } } -// Draw the top edge of the box +// Draw the top frame of the box - if ( lcx ) + if ( lcx || lwx ) { - plP_movphy( vppxma, vppyma ); - plP_draphy( vppxmi, vppyma ); + if ( lcx ) + { + plP_movphy( vppxma, vppyma ); + plP_draphy( vppxmi, vppyma ); + } if ( ltx ) { if ( ldx ) @@ -382,12 +397,15 @@ } } -// Draw left-hand edge of box +// Draw left-hand frame of box - if ( lby ) + if ( lby || luy ) { - plP_movphy( vppxmi, vppyma ); - plP_draphy( vppxmi, vppymi ); + if ( lby ) + { + plP_movphy( vppxmi, vppyma ); + plP_draphy( vppxmi, vppymi ); + } if ( lty ) { if ( ldy ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |