#include <math.h>
#include <chplot.h>

int main() {
    int numpoints = 8;
    array double x[numpoints], y[numpoints], y2[numpoints];
    class CPlot plot;

    linspace(x, 0, 360);
    y = sin(x*M_PI/180);
    y2 = sin(x*M_PI/180);
    plot.data2D(x, y);
    plot.data2D(x, y2);
    plot.smooth(1, "csplines");
    plot.legend("sin(x)", 0);
    plot.legend("smooth sin(x)", 1);
    plot.plotting();
}