Added new files resulting from directory restructuring.
[pspp-builds.git] / src / output / chart.h
1 /* PSPP - computes sample statistics.
2    Copyright (C) 2004 Free Software Foundation, Inc.
3    Written by John Darrington <john@darrington.wattle.id.au>
4
5    This program is free software; you can redistribute it and/or
6    modify it under the terms of the GNU General Public License as
7    published by the Free Software Foundation; either version 2 of the
8    License, or (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful, but
11    WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software
17    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18    02110-1301, USA. */
19
20 #include <config.h>
21 #include <stdio.h>
22 #include <stdarg.h>
23 #include <string.h>
24 #include <stdio.h>
25 #include <float.h>
26 #include <assert.h>
27 #include <math.h>
28
29 #include "chart-geometry.h"
30 #include "str.h"
31 #include "alloc.h"
32 #include "manager.h"
33 #include "output.h"
34
35 #ifndef CHART_H
36 #define CHART_H
37
38 #ifndef NO_CHARTS
39 #include <plot.h>
40 #endif
41
42 struct chart {
43
44 #ifndef NO_CHARTS
45   plPlotter *lp ;
46   plPlotterParams *pl_params;
47 #else
48   void *lp;
49 #endif
50   char *filename;
51   FILE *file;
52
53   /* The geometry of the chart 
54      See diagram at the foot of this file.
55    */
56   
57   int data_top   ;
58   int data_right ;
59   int data_bottom;
60   int data_left  ;
61
62   int abscissa_top;
63
64   int ordinate_right ;
65
66   int title_bottom ;
67
68   int legend_left ;
69   int legend_right ;
70
71   
72   /* Default font size for the plot (if zero, then use plotter default) */
73   int font_size; 
74
75   char fill_colour[10];
76
77   /* Stuff Particular to Cartesians (and Boxplots ) */
78   double ordinate_scale;
79   double abscissa_scale;
80   double x_min;
81   double x_max;
82   double y_min;
83   double y_max;
84 };
85
86
87
88 struct chart * chart_create(void);
89 void chart_submit(struct chart *ch);
90
91 #endif