projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/ui/gui/psppire.c: Fold long line
[pspp]
/
src
/
output
/
charts
/
scatterplot.h
diff --git
a/src/output/charts/scatterplot.h
b/src/output/charts/scatterplot.h
index e95562bbad9150d7032e9fadb24920d6dfff6f96..cf549e9c1db5daaded9c43a3d96f432fd7123ecb 100644
(file)
--- a/
src/output/charts/scatterplot.h
+++ b/
src/output/charts/scatterplot.h
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* 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
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
@@
-17,14
+17,24
@@
#ifndef OUTPUT_CHARTS_SCATTERPLOT_H
#define OUTPUT_CHARTS_SCATTERPLOT_H 1
#ifndef OUTPUT_CHARTS_SCATTERPLOT_H
#define OUTPUT_CHARTS_SCATTERPLOT_H 1
-#include "output/chart-item.h"
+#include "output/chart.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
{
/* A scatterplot. */
struct scatterplot_chart
{
- struct chart
_item chart_item
;
+ struct chart
chart
;
struct casereader *data;
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;
double y_min, y_max;
double x_min, x_max;
@@
-35,25
+45,25
@@
struct scatterplot_chart
};
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,
double xmin, double xmax, double ymin, double ymax);
\f
const struct variable *,
bool *,
const char *label,
double xmin, double xmax, double ymin, double ymax);
\f
-/* This boilerplate for scatterplot_chart, a subclass of chart
_item
, was
+/* This boilerplate for scatterplot_chart, a subclass of chart, was
autogenerated by mk-class-boilerplate. */
#include <assert.h>
#include "libpspp/cast.h"
autogenerated by mk-class-boilerplate. */
#include <assert.h>
#include "libpspp/cast.h"
-extern const struct chart_
item_
class scatterplot_chart_class;
+extern const struct chart_class scatterplot_chart_class;
/* Returns true if SUPER is a scatterplot_chart, otherwise false. */
static inline bool
/* Returns true if SUPER is a scatterplot_chart, otherwise false. */
static inline bool
-is_scatterplot_chart (const struct chart
_item
*super)
+is_scatterplot_chart (const struct chart *super)
{
return super->class == &scatterplot_chart_class;
}
{
return super->class == &scatterplot_chart_class;
}
@@
-61,24
+71,24
@@
is_scatterplot_chart (const struct chart_item *super)
/* Returns SUPER converted to scatterplot_chart. SUPER must be a scatterplot_chart, as
reported by is_scatterplot_chart. */
static inline struct scatterplot_chart *
/* Returns SUPER converted to scatterplot_chart. SUPER must be a scatterplot_chart, as
reported by is_scatterplot_chart. */
static inline struct scatterplot_chart *
-to_scatterplot_chart (const struct chart
_item
*super)
+to_scatterplot_chart (const struct chart *super)
{
assert (is_scatterplot_chart (super));
{
assert (is_scatterplot_chart (super));
- return UP_CAST (super, struct scatterplot_chart, chart
_item
);
+ return UP_CAST (super, struct scatterplot_chart, chart);
}
}
-/* Returns INSTANCE converted to chart
_item
. */
-static inline struct chart
_item
*
+/* Returns INSTANCE converted to chart. */
+static inline struct chart *
scatterplot_chart_super (const struct scatterplot_chart *instance)
{
scatterplot_chart_super (const struct scatterplot_chart *instance)
{
- return CONST_CAST (struct chart
_item *, &instance->chart_item
);
+ return CONST_CAST (struct chart
*, &instance->chart
);
}
/* Increments INSTANCE's reference count and returns INSTANCE. */
static inline struct scatterplot_chart *
scatterplot_chart_ref (const struct scatterplot_chart *instance)
{
}
/* Increments INSTANCE's reference count and returns INSTANCE. */
static inline struct scatterplot_chart *
scatterplot_chart_ref (const struct scatterplot_chart *instance)
{
- return to_scatterplot_chart (chart_
item_ref (&instance->chart_item
));
+ return to_scatterplot_chart (chart_
ref (&instance->chart
));
}
/* Decrements INSTANCE's reference count, then destroys INSTANCE if
}
/* Decrements INSTANCE's reference count, then destroys INSTANCE if
@@
-86,7
+96,7
@@
scatterplot_chart_ref (const struct scatterplot_chart *instance)
static inline void
scatterplot_chart_unref (struct scatterplot_chart *instance)
{
static inline void
scatterplot_chart_unref (struct scatterplot_chart *instance)
{
- chart_
item_unref (&instance->chart_item
);
+ chart_
unref (&instance->chart
);
}
/* Returns true if INSTANCE's reference count is greater than 1,
}
/* Returns true if INSTANCE's reference count is greater than 1,
@@
-94,13
+104,13
@@
scatterplot_chart_unref (struct scatterplot_chart *instance)
static inline bool
scatterplot_chart_is_shared (const struct scatterplot_chart *instance)
{
static inline bool
scatterplot_chart_is_shared (const struct scatterplot_chart *instance)
{
- return chart_i
tem_is_shared (&instance->chart_item
);
+ return chart_i
s_shared (&instance->chart
);
}
static inline void
scatterplot_chart_submit (struct scatterplot_chart *instance)
{
}
static inline void
scatterplot_chart_submit (struct scatterplot_chart *instance)
{
- chart_
item_submit (&instance->chart_item
);
+ chart_
submit (&instance->chart
);
}
\f
#endif /* output/charts/scatterplot.h */
}
\f
#endif /* output/charts/scatterplot.h */