#include <chplot.h>
#include <math.h>
int main() {
class CPlot subplot, *spl;
array double x1[30], y1[30];
linspace(x1, -M_PI, M_PI);
y1 = sin(x1);
subplot.subplot(3,3);
spl = subplot.getSubplot(0,0);
spl->data2D(x1, y1);
spl->plotType(PLOT_PLOTTYPE_LINES, 0);
spl->label(PLOT_AXIS_XY, NULL);
spl->title("PLOT_PLOTTYPE_LINES");
spl = subplot.getSubplot(0,1);
spl->data2D(x1, y1);
spl->plotType(PLOT_PLOTTYPE_IMPULSES, 0);
spl->label(PLOT_AXIS_XY, NULL);
spl->title("PLOT_PLOTTYPE_IMPULSES");
spl = subplot.getSubplot(0,2);
spl->data2D(x1, y1);
spl->plotType(PLOT_PLOTTYPE_STEPS, 0);
spl->label(PLOT_AXIS_XY, NULL);
spl->title("PLOT_PLOTTYPE_STEPS");
spl = subplot.getSubplot(1,0);
spl->data2D(x1, y1);
spl->plotType(PLOT_PLOTTYPE_FSTEPS, 0);
spl->label(PLOT_AXIS_XY, NULL);
spl->title("PLOT_PLOTTYPE_FSTEPS");
spl = subplot.getSubplot(1,1);
spl->data2D(x1, y1);
spl->plotType(PLOT_PLOTTYPE_POINTS, 0, 7, 1);
spl->label(PLOT_AXIS_XY, NULL);
spl->title("PLOT_PLOTTYPE_POINTS");
spl = subplot.getSubplot(1,2);
spl->data2D(x1, y1);
spl->plotType(PLOT_PLOTTYPE_LINESPOINTS, 0, 0, 1, 7, 1);
spl->label(PLOT_AXIS_XY, NULL);
spl->title("PLOT_PLOTTYPE_LINESPOINTS");
spl = subplot.getSubplot(2,0);
spl->data2D(x1, y1);
spl->plotType(PLOT_PLOTTYPE_DOTS, 0);
spl->label(PLOT_AXIS_XY, NULL);
spl->title("PLOT_PLOTTYPE_DOTS");
spl = subplot.getSubplot(2,1);
spl->data2D(x1, y1);
spl->plotType(PLOT_PLOTTYPE_HISTEPS, 0);
spl->label(PLOT_AXIS_XY, NULL);
spl->title("PLOT_PLOTTYPE_HISTEPS");
subplot.plotting();
}