xml-parser-generator - iterate over sorted dict - #58975
[pspp] / src / output / charts / scatterplot.h
index e95562bbad9150d7032e9fadb24920d6dfff6f96..a78227dabc622badc9c8c765a328fffb63652d92 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2014 Free Software Foundation, Inc.
+   Copyright (C) 2014, 2015 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include "output/chart-item.h"
 
+/* Indices for the scatterplot_proto members */
+enum
+  {
+    SP_IDX_X,    /* x value */
+    SP_IDX_Y,    /* y value */
+    SP_IDX_BY,   /* graph category for xy plot */
+  };
+
 /* A  scatterplot. */
 struct scatterplot_chart
   {
     struct chart_item chart_item;
     struct casereader *data;
-    const struct variable *xvar, *yvar, *byvar;
+    struct variable *byvar;
+    char *xlabel;
+    char *ylabel;
 
     double y_min, y_max;
     double x_min, x_max;
@@ -35,9 +45,9 @@ struct scatterplot_chart
   };
 
 struct scatterplot_chart *
-scatterplot_create (const struct casereader *, 
-                   const struct variable *, 
-                   const struct variable *,
+scatterplot_create (struct casereader *,
+                   const char *xlabel,
+                   const char *ylabel,
                    const struct variable *,
                    bool *,
                    const char *label,