#!/bin/ch /* plot2.cgi */ #include #include #include 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(); }