Function:s2lab

From S2PLOT

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

s2lab

Draw labels along the edges of bounding box.

Prototype

void s2lab(char *xlab, char *ylab, char *zlab, char *title);

Description

Draw labels along the edges of the viewport. Note that this routine expects s2box to have been called with options to produce panels for drawing axis text on. If not, then the function will not fail, but the resultant labels will be overlaid on back-to-front versions of same.

See Also

s2box Draw a labelled box around the world space.
s2iden Write username, date, time and optional string at bottom of plot.

PGPLOT Equivalent

PGLAB

Code Example

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

int main(int argc, char *argv[])
{
   char xopt[] = "BCDETMNOPQ";
   char yopt[] = "BCDETMNOPQ";
   char zopt[] = "BCDETMNOPQ";

   s2opend("/?",argc, argv);			/* Open the display */
   s2swin(-1.,1., -1.,1., -1.,1.);		/* Set the window coordinates */
   s2box(xopt, 0,0, yopt, 0,0, zopt, 0,0);	/* Draw the coordinate box */
   s2lab("X-axis","Y-axis","Z-axis","Plot");	/* Write some labels */
   s2show(1);					/* Open the s2plot window */
   
   return 1;
}

Back to S2PLOT function list.


Personal tools