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

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

    logspace(x, -1, 2);
    y = exp(x);                               // Y-axis data.
    plot.scaleType(PLOT_AXIS_XY, PLOT_SCALETYPE_LOG);
    plot.ticsFormat(PLOT_AXIS_XY, "%.2e");
    plot.data2D(x, y);
    plot.plotting();
}