1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 2004, 2009 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
29 #include <math/chart-geometry.h>
30 #include <output/chart.h>
31 #include <output/chart-provider.h>
33 #include <libpspp/compiler.h>
34 #include <libpspp/str.h>
35 #include <output/manager.h>
36 #include <output/output.h>
38 #define N_CHART_COLOURS 9
39 extern const struct chart_colour data_colour[];
47 struct chart_geometry;
50 /* Draw a tick mark at position
51 If label is non zero, then print it at the tick mark
53 void draw_tick(plPlotter *, const struct chart_geometry *,
54 enum tick_orientation orientation,
56 const char *label, ...)
60 /* Write the title on a chart*/
61 void chart_write_title(plPlotter *, const struct chart_geometry *,
62 const char *title, ...)
66 /* Set the scale for the abscissa */
67 void chart_write_xscale(plPlotter *, struct chart_geometry *,
68 double min, double max, int ticks);
71 /* Set the scale for the ordinate */
72 void chart_write_yscale(plPlotter *, struct chart_geometry *,
73 double smin, double smax, int ticks);
75 void chart_write_xlabel(plPlotter *, const struct chart_geometry *,
78 /* Write the ordinate label */
79 void chart_write_ylabel(plPlotter *, const struct chart_geometry *,