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

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

    linspace(t, 0, 2*M_PI);
    x = sin(2*t);
    y = cos(3*t);
    plot.data2D(x, y);
    plot.title("Parametric contour (x, y) = [sin(2x), cos(3x)]");
    plot.label(PLOT_AXIS_X, "x");
    plot.label(PLOT_AXIS_Y, "y");

    /* both x and y axes the same length */
    plot.sizeRatio(1);
    plot.plotting();
}