};
+#define PLOT_HISTOGRAM 0x1
+#define PLOT_BOXPLOT 0x2
+#define PLOT_NPPLOT 0x4
+#define PLOT_SPREADLEVEL 0x8
+
+
struct examine
{
struct pool *pool;
double *ptiles;
size_t n_percentiles;
- bool npplot;
- bool histogramplot;
- bool boxplot;
- bool spreadlevelplot;
+ unsigned int plot;
int sl_power;
enum bp_mode boxplot_mode;
struct casereader *reader;
struct ccase *c;
- if (examine->histogramplot && es[v].non_missing > 0)
+ if (examine->plot & PLOT_HISTOGRAM && es[v].non_missing > 0)
{
/* Sturges Rule */
double bin_width = fabs (es[v].minimum - es[v].maximum)
free (os);
}
- if (examine->boxplot)
+ if (examine->plot & PLOT_BOXPLOT)
{
struct order_stats *os;
EX_WT, EX_VAL);
}
- if (examine->npplot)
+ if (examine->plot & PLOT_NPPLOT)
{
double n, mean, var;
struct order_stats *os;
if (cmd->n_percentiles > 0)
percentiles_report (cmd, i);
- if (cmd->boxplot)
+ if (cmd->plot & PLOT_BOXPLOT)
{
switch (cmd->boxplot_mode)
{
}
}
- if (cmd->histogramplot)
+ if (cmd->plot & PLOT_HISTOGRAM)
show_histogram (cmd, i);
- if (cmd->npplot)
+ if (cmd->plot & PLOT_NPPLOT)
show_npplot (cmd, i);
- if (cmd->spreadlevelplot)
+ if (cmd->plot & PLOT_SPREADLEVEL)
show_spreadlevel (cmd, i);
if (cmd->descriptives)
examine.dep_excl = MV_ANY;
examine.fctr_excl = MV_ANY;
- examine.histogramplot = false;
- examine.npplot = false;
- examine.boxplot = false;
- examine.spreadlevelplot = false;
+ examine.plot = 0;
examine.sl_power = 0;
examine.dep_vars = NULL;
examine.n_dep_vars = 0;
{
if (lex_match_id (lexer, "BOXPLOT"))
{
- examine.boxplot = true;
+ examine.plot |= PLOT_BOXPLOT;
}
else if (lex_match_id (lexer, "NPPLOT"))
{
- examine.npplot = true;
+ examine.plot |= PLOT_NPPLOT;
}
else if (lex_match_id (lexer, "HISTOGRAM"))
{
- examine.histogramplot = true;
+ examine.plot |= PLOT_HISTOGRAM;
}
else if (lex_match_id (lexer, "SPREADLEVEL"))
{
- examine.spreadlevelplot = true;
+ examine.plot |= PLOT_SPREADLEVEL;
examine.sl_power = 0;
if (lex_match (lexer, T_LPAREN) && lex_force_int (lexer))
{
}
else if (lex_match_id (lexer, "NONE"))
{
- examine.histogramplot = false;
- examine.npplot = false;
- examine.boxplot = false;
+ examine.plot = 0;
}
else if (lex_match (lexer, T_ALL))
{
- examine.histogramplot = true;
- examine.npplot = true;
- examine.boxplot = true;
+ examine.plot = ~0;
}
else
{