Stephen M. Cameron | af58ef3 | 2012-03-07 07:56:16 +0100 | [diff] [blame] | 1 | #ifndef GRAPH_H |
| 2 | #define GRAPH_H |
| 3 | |
| 4 | struct graph; |
| 5 | |
Stephen M. Cameron | cae0872 | 2012-03-07 14:47:38 +0100 | [diff] [blame] | 6 | #define INVISIBLE_COLOR (-1.0) |
| 7 | |
Jens Axboe | f3e8440 | 2012-03-07 13:14:32 +0100 | [diff] [blame] | 8 | struct graph *graph_new(unsigned int xdim, unsigned int ydim, const char *font); |
Stephen M. Cameron | 3ea48b8 | 2012-03-07 19:40:58 +0100 | [diff] [blame] | 9 | void graph_set_size(struct graph *g, unsigned int xdim, unsigned int ydim); |
Stephen M. Cameron | af58ef3 | 2012-03-07 07:56:16 +0100 | [diff] [blame] | 10 | void bar_graph_draw(struct graph *g, cairo_t *cr); |
| 11 | void line_graph_draw(struct graph *g, cairo_t *cr); |
| 12 | void line_graph_set_data_count_limit(struct graph *g, int per_label_limit); |
| 13 | void graph_title(struct graph *g, const char *title); |
| 14 | void graph_x_title(struct graph *g, const char *title); |
| 15 | void graph_y_title(struct graph *g, const char *title); |
| 16 | void graph_add_label(struct graph *g, const char *label); |
Stephen M. Cameron | 09ad20f | 2012-03-11 11:34:38 +0100 | [diff] [blame^] | 17 | int graph_add_data(struct graph *g, const char *label, const double value); |
| 18 | int graph_add_xy_data(struct graph *g, const char *label, |
Stephen M. Cameron | af58ef3 | 2012-03-07 07:56:16 +0100 | [diff] [blame] | 19 | const double x, const double y); |
| 20 | void graph_set_color(struct graph *g, const char *label, |
| 21 | double red, double green, double blue); |
| 22 | void graph_free(struct graph *bg); |
| 23 | |
| 24 | |
| 25 | #endif |
| 26 | |