HowToC:DrawLines
From S2PLOT
(Difference between revisions)
Revision as of 22:38, 10 December 2007 S2plot admin (Talk | contribs) ← Previous diff |
Revision as of 23:49, 10 December 2007 S2plot admin (Talk | contribs) Next diff → |
||
Line 33: | Line 33: | ||
For more information on the functions we have introduced so far, see: | For more information on the functions we have introduced so far, see: | ||
+ | |||
+ | * [[Function:s2line|s2line]] | ||
+ | * [[Fucntion:s2slw|s2slw]] | ||
+ | * [[Fucntion:s2sls|s2sls]] | ||
+ | * [[Function:s2arro|s2arro]] | ||
+ | * [[Function:s2sah|s2sah]] | ||
+ | * [[Function:s2qah|s2qah]] | ||
+ | * [[Function:s2errb|s2errb]] | ||
+ | * [[Function:ns2line|ns2line]] | ||
+ | * [[Function:ns2vline|ns2line]] | ||
+ | * [[Function:ns2thline|ns2line]] | ||
+ | * [[Function:ns2vthline|ns2line]] | ||
+ | * [[Function:ns2cline|ns2line]] | ||
+ | * [[Function:ns2vcline|ns2line]] | ||
+ | |||
+ | |||
+ | |||
Revision as of 23:49, 10 December 2007
Contents |
Drawing Lines
Points example
Copy and paste the following code, and save the file as s2lines.c
#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"
int main(int argc, char *argv[])
{
float xmin = -1, xmax = +1; /* X data range */
float ymin = -1, ymax = +1; /* Y data range */
float zmin = -1, zmax = +1; /* Z data range */
s2opend("/?",argc,argv); /* Which S2PLOT device to open? */
s2swin(xmin, xmax, ymin, ymax, zmin, zmax); /* Set the display coordinates */
s2show(1); /* Hand over to the display */
return 1;
}
Compile using: cbuild.csh s2example<tt> and then run by typing <tt>s2example at the command prompt.
Experiment for yourself
Function Overview
For more information on the functions we have introduced so far, see:
Common Problems
Test code: s2points.c
This is the full test code for the point-drawing example.
Where to Next?
- Back to S2PLOT How To...
- Drawing circles and disks