19 |
20 | - create a plot object:
21 |
22 | #include "gnuplot/gplot.h"
23 | ...
24 | plot_t *p = openPlot("name of plot");
25 |
26 |
27 | - Send the plot some information:
28 |
29 | int a = 1;
30 | send2plot(p,"plot [x=%d:%d] cos(x)",-a,a);
31 |
32 |
33 | - There are also many predefined interface functions;
34 | for example:
35 |
36 | int i; float A[100];
37 | for(i=0;i<100;++i) A[i] = i/3.0;
38 | plotData(A,100,p,plotFloats);
39 |
40 |
41 |
42 | - when finished close the plot:
43 |
44 | closePlot(p);
45 |
46 |
47 |
48 |
49 | Other links:
50 |