projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix description of "count" in Auxiliary Variable Parameter Record.
[pspp]
/
src
/
chart.h
diff --git
a/src/chart.h
b/src/chart.h
index d22c394fdb21a0a21864fcaa26c5c24b5ec5d079..c0ab0a2063106397e8c13205cb378521c0595f6a 100644
(file)
--- a/
src/chart.h
+++ b/
src/chart.h
@@
-14,19
+14,22
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 5
9 Temple Place - Suite 330
, Boston, MA
- 0211
1-1307
, USA. */
+ Foundation, Inc., 5
1 Franklin Street, Fifth Floor
, Boston, MA
+ 0211
0-1301
, USA. */
#ifndef CHART_H
#define CHART_H
#ifndef CHART_H
#define CHART_H
+#include <config.h>
#include <stdio.h>
#include <stdio.h>
-#include <plot.h>
#include <gsl/gsl_histogram.h>
#include <gsl/gsl_histogram.h>
-
#include "var.h"
#include "var.h"
+#ifndef NO_CHARTS
+#include <plot.h>
+#endif
+
/* Array of standard colour names */
extern const char *data_colour[];
/* Array of standard colour names */
extern const char *data_colour[];
@@
-34,8
+37,14
@@
extern const char *data_colour[];
struct chart {
struct chart {
+#ifndef NO_CHARTS
plPlotter *lp ;
plPlotterParams *pl_params;
plPlotter *lp ;
plPlotterParams *pl_params;
+#else
+ void *lp;
+#endif
+ char *filename;
+ FILE *file;
/* The geometry of the chart
See diagram at the foot of this file.
/* The geometry of the chart
See diagram at the foot of this file.
@@
-61,7
+70,7
@@
struct chart {
char fill_colour[10];
char fill_colour[10];
- /* Stuff Particular to Cartesians */
+ /* Stuff Particular to Cartesians
(and Boxplots )
*/
double ordinate_scale;
double abscissa_scale;
double x_min;
double ordinate_scale;
double abscissa_scale;
double x_min;
@@
-72,11
+81,10
@@
struct chart {
};
};
-int chart_initialise(struct chart *ch);
-
-void chart_finalise(struct chart *ch);
-
+struct chart * chart_create(void);
+void chart_submit(struct chart *ch);
+double chart_rounded_tick(double tick);
void chart_write_xlabel(struct chart *ch, const char *label);
void chart_write_ylabel(struct chart *ch, const char *label);
void chart_write_xlabel(struct chart *ch, const char *label);
void chart_write_ylabel(struct chart *ch, const char *label);
@@
-118,10
+126,19
@@
struct normal_curve
void histogram_write_legend(struct chart *ch, const struct normal_curve *norm);
void histogram_write_legend(struct chart *ch, const struct normal_curve *norm);
+/* Plot a gsl_histogram */
void histogram_plot(const gsl_histogram *hist, const char *factorname,
const struct normal_curve *norm, short show_normal);
void histogram_plot(const gsl_histogram *hist, const char *factorname,
const struct normal_curve *norm, short show_normal);
+/* Create a gsl_histogram and set it's parameters based upon
+ x_min, x_max and bins.
+ The caller is responsible for freeing the histogram.
+*/
+gsl_histogram * histogram_create(double bins, double x_min, double x_max) ;
+
+
+
struct slice {
struct slice {
@@
-156,6
+173,17
@@
void chart_write_yscale(struct chart *ch,
void chart_datum(struct chart *ch, int dataset, double x, double y);
void chart_datum(struct chart *ch, int dataset, double x, double y);
+struct metrics;
+
+
+void boxplot_draw_boxplot(struct chart *ch,
+ double box_centre,
+ double box_width,
+ struct metrics *m,
+ const char *name);
+
+
+void boxplot_draw_yscale(struct chart *ch , double y_max, double y_min);
enum CHART_DIM
enum CHART_DIM