#include <math.h> #include <chplot.h> int main() { double complex z[12]; char option[64]; int i; class CPlot plot; for (i=0; i<12; i++) { real(z[i]) = (5+sin(150*i*M_PI/180))*cos(30*i*M_PI/180); imag(z[i]) = (5+sin(150*i*M_PI/180))*sin(30*i*M_PI/180); sprintf(option, "linetype 1 linewidth %d", i+1); plot.arrow(real(z[i]), imag(z[i]), 0, 0, 0, 0, option); } plot.axisRange(PLOT_AXIS_XY, -6, 6); /* one point cannot do autorange */ plot.point(real(z[0]), imag(z[0]), 0); /* CPlot::arrow() itself is not a data set */ plot.plotType(PLOT_PLOTTYPE_DOTS, 0); plot.sizeRatio(-1); plot.plotting(); }