#include <math.h> #include <chplot.h> int main() { array double x[360], y[360], z[2][360]; int i; class CPlot plot; linspace(x, 0, 360); y = sin(x*M_PI/180); for(i=0; i<360; i++) { z[0][i] = cos(x[i]*M_PI/180); z[1][i] = y[i]; } plot.dimension(3); plot.data3D(x, y, z); plot.plotType(PLOT_PLOTTYPE_LINES, 1, 0, 3); /* set the second data set to use the default line type and a line width three times the default */ plot.plotting(); }