blob: 39dd2b0eb954a90a66ac61fff5023818d9aec93f [file] [log] [blame]
Stephen M. Cameronaf58ef32012-03-07 07:56:16 +01001#ifndef GRAPH_H
2#define GRAPH_H
3
4struct graph;
5
Stephen M. Cameroncae08722012-03-07 14:47:38 +01006#define INVISIBLE_COLOR (-1.0)
7
Jens Axboef3e84402012-03-07 13:14:32 +01008struct graph *graph_new(unsigned int xdim, unsigned int ydim, const char *font);
Stephen M. Cameron3ea48b82012-03-07 19:40:58 +01009void graph_set_size(struct graph *g, unsigned int xdim, unsigned int ydim);
Stephen M. Cameronaf58ef32012-03-07 07:56:16 +010010void bar_graph_draw(struct graph *g, cairo_t *cr);
11void line_graph_draw(struct graph *g, cairo_t *cr);
12void line_graph_set_data_count_limit(struct graph *g, int per_label_limit);
13void graph_title(struct graph *g, const char *title);
14void graph_x_title(struct graph *g, const char *title);
15void graph_y_title(struct graph *g, const char *title);
16void graph_add_label(struct graph *g, const char *label);
17void graph_add_data(struct graph *g, const char *label, const double value);
18void graph_add_xy_data(struct graph *g, const char *label,
19 const double x, const double y);
20void graph_set_color(struct graph *g, const char *label,
21 double red, double green, double blue);
22void graph_free(struct graph *bg);
23
24
25#endif
26