#include <stdio.h>#include <values.h>#include "gdc.h"#include "gdchart.h"Go to the source code of this file.
Functions | |
| main () | |
| main | ( | void | ) |
Definition at line 17 of file gdc_samp1.c.
References GDC_3DBAR, GDC_STACK_BESIDE, and out_graph().
00018 { 00019 /* ----- set some data ----- */ 00020 float a[6] = { 0.5, 0.09, 0.6, 0.85, 0.0, 0.90 }, 00021 b[6] = { 1.9, 1.3, 0.6, 0.75, 0.1, 2.0 }; 00022 /* ----- X labels ----- */ 00023 char *t[6] = { "Chicago", "New York", "L.A.", "Atlanta", "Paris, MD\n(USA) ", "London" }; 00024 /* ----- data set colors (RGB) ----- */ 00025 unsigned long sc[2] = { 0xFF8080, 0x8080FF }; 00026 00027 GDC_BGColor = 0xFFFFFFL; /* backgound color (white) */ 00028 GDC_LineColor = 0x000000L; /* line color (black) */ 00029 GDC_SetColor = &(sc[0]); /* assign set colors */ 00030 00031 GDC_stack_type = GDC_STACK_BESIDE; 00032 // printf( "Content-Type: image/gif\n\n" ); /* tell browser type */ 00033 00034 /* ----- call the lib ----- */ 00035 out_graph( 250, 200, /* short width, height */ 00036 stdout, /* FILE* open FILE pointer */ 00037 GDC_3DBAR, /* GDC_CHART_T chart type */ 00038 6, /* int number of points per data set */ 00039 t, /* char*[] array of X labels */ 00040 2, /* int number of data sets */ 00041 a, /* float[] data set 1 */ 00042 b ); /* ... data set n */ 00043 00044 exit(0); 00045 }
1.5.1