Function:s2textyz

From S2PLOT

Revision as of 08:35, 27 October 2007; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

s2textyz

Draw text in the yz plane at a fixed x coordinate.

Prototype

void s2textyz(float x, float y, float z, char *text);

Description

Draw text in the yz plane, at a fixed x coordinate. Text is drawn with its bottom left corner at the given coordinate. For text extending in the positive direction along an axis, use the s2textyzf versions and give the flipy and/or flipz argument as +1, use -1 for flipped text, or any other value for arbitrary scaling.

See Also

s2textxy Draw text in the xy plane at a fixed z coordinate.
s2textxz Draw text in the xz plane at a fixed y coordinate.
s2textxyf Draw flipped text in the xy plane at a fixed z coordinate.
s2textxzf Draw flipped text in the xz plane at a fixed y coordinate.
s2textyzf Draw flipped text in the yz plane at a fixed x coordinate.
s2qtxtyz Find the bounding box of text drawn with s2textyz.

PGPLOT Equivalent

PGTEXT

Code Example

#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"

int main(int argc, char *argv[])
{
   float x = 0.0;
   float y = 0.5;
   float z = 0.2; 
   char string[32] = "S2PLOT is great!";

   s2opend("/?",argc, argv);			/* Open the display */
   s2swin(-1.,1., -1.,1., -1.,1.);		/* Set the window coordinates */
   s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0);	/* Draw coordinate box */

   s2sci(S2_PG_YELLOW);
   s2slw(2);					/* Set line width */
   s2textyz(x,y,z,string);			/* Write some text in y-z plane */

   s2show(1);					/* Open the s2plot window */
   
   return 1;
}

Back to S2PLOT function list.


Personal tools