topical media & game development
lib-ch-example-sample-plot3.cgi / cgi
#!/bin/ch
/* plot2.cgi */
include <stdio.h>
include <numeric.h>
include <chplot.h>
int main() {
array double x[50];
class CPlot plot;
setvbuf(stdout, NULL, _IONBF, 0);
linspace(x, 0, 6.2);
plotxy(x, sin(x), "Web-based plotting", "x", "sin(x)", &plot);
plot.outputType(PLOT_OUTPUTTYPE_STREAM, "png");
plot.plotting();
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.