Function:s2swin

From S2PLOT

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

s2swin

Set up the world coordinate range for the device.

Prototype

void s2swin(float x1, float x2, float y1, float y2, float z1, float z2);

Description

Set up the world coordinate range for the device. This configures the mapping of the user's coordinates to the device coordinates. x1, x2 define the range of the X-axis; y1, y2 the Y-axis, and z1, z2 the Z-axis. We use a standard right-handed coordinate system with X negative to left, positive to right; Y negative out of the screen, positive into the screen; and Z negative down, positive up. A "fatal" error will occur if x1 > x2, or y1 > y2, or z1 > z2.

See Also

s2qwin Query the world coordinate range.

PGPLOT Equivalent

PGSWIN

Code Example

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

int main(int argc, char *argv[])
{
   s2opend("/?",argc, argv);			/* Open the display */

   s2swin(-5.,5., -3.,3., -1.,1.);		/* Set the window coordinates */
   s2box("BCDETMNO",0,0,"BCDETMNO",0,0,"BCDETMNO",0,0);	
						/* Draw coordinate box */
   s2show(1);					/* Open the s2plot window */
   
   return 1;
}

Back to S2PLOT function list.


Personal tools