Function:s2svp
From S2PLOT
(Difference between revisions)
Current revision
s2svp
Set up the part of 3D space that is used for plotting.
Prototype
void s2svp(float x1, float x2, float y1, float y2, float z1, float z2);
Description
Set up the region of 3D space that is used for plotting. This is the "viewport" where graphics are drawn. The default values are [-1,+1] for all coordinates. A "fatal" error will occur if x1 > x2 or y1 > y2 or z1 > z2.
See Also
s2qvp | Query the device viewport range. |
PGPLOT Equivalent
Code Example
#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"
int main(int argc, char *argv[])
{
s2opend("/?",argc, argv); /* Open the display */
s2svp(-1.,0., -1.,1., -1.,1.); /* First view port */
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_RED);
s2svp(0.5,1., -1.,1., -1.,1.); /* Second viewport */
s2swin(-1.,1., -1.,1., -1.,1.); /* Set the window coordinates */
s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0); /* Draw coordinate box */
s2show(1); /* Open the s2plot window */
return 1;
}
Back to S2PLOT function list.