for (v = 0; v < ag_func[i].arity; ++v)
{
graph->dep_vars[v] = parse_variable (lexer, graph->dict);
for (v = 0; v < ag_func[i].arity; ++v)
{
graph->dep_vars[v] = parse_variable (lexer, graph->dict);
- const double x = case_data_idx (c, HG_IDX_X)->f;
- const double weight = case_data_idx (c, HG_IDX_WT)->f;
+ const double x = case_num_idx (c, HG_IDX_X);
+ const double weight = case_num_idx (c, HG_IDX_WT);
moments_pass_two (cmd->es[0].mom, x, weight);
histogram_add (histogram, x, weight);
}
moments_pass_two (cmd->es[0].mom, x, weight);
histogram_add (histogram, x, weight);
}
moments_calculate (cmd->es[0].mom, &n, &mean, &var, NULL, NULL);
moments_calculate (cmd->es[0].mom, &n, &mean, &var, NULL, NULL);
ds_cstr (&label), n, mean,
sqrt (var), cmd->normal));
ds_cstr (&label), n, mean,
sqrt (var), cmd->normal));
for (v = 0; v < cmd->n_by_vars; ++v)
{
if (var_is_value_missing (cmd->by_var[v],
for (v = 0; v < cmd->n_by_vars; ++v)
{
if (var_is_value_missing (cmd->by_var[v],
{
const double weight = dict_get_case_weight (cmd->dict,c,NULL);
const double x = (cmd->n_dep_vars > 0)
{
const double weight = dict_get_case_weight (cmd->dict,c,NULL);
const double x = (cmd->n_dep_vars > 0)
- chart_item_submit (barchart_create (cmd->by_var, cmd->n_by_vars,
- ds_cstr (&label), false,
- cells, n_cells));
+ chart_submit (barchart_create (cmd->by_var, cmd->n_by_vars,
+ ds_cstr (&label), false,
+ cells, n_cells));
/* Always remove cases listwise. This is correct for */
/* the histogram because there is only one variable */
/* and a simple bivariate scatterplot */
/* Always remove cases listwise. This is correct for */
/* the histogram because there is only one variable */
/* and a simple bivariate scatterplot */
struct ccase *outcase = case_create (cmd->gr_proto);
const double weight = dict_get_case_weight (cmd->dict,c,NULL);
if (cmd->chart_type == CT_HISTOGRAM)
struct ccase *outcase = case_create (cmd->gr_proto);
const double weight = dict_get_case_weight (cmd->dict,c,NULL);
if (cmd->chart_type == CT_HISTOGRAM)
if (cmd->chart_type == CT_SCATTERPLOT && cmd->n_by_vars > 0)
value_copy (case_data_rw_idx (outcase, SP_IDX_BY),
case_data (c, cmd->by_var[0]),
if (cmd->chart_type == CT_SCATTERPLOT && cmd->n_by_vars > 0)
value_copy (case_data_rw_idx (outcase, SP_IDX_BY),
case_data (c, cmd->by_var[0]),
- if (var_is_value_missing (var, case_data (c, var), cmd->dep_excl))
+ if (var_is_value_missing (var, case_data (c, var)) & cmd->dep_excl)
{
cmd->es[v].missing += weight;
continue;
}
/* Magically v value fits to SP_IDX_X, SP_IDX_Y, HG_IDX_X */
{
cmd->es[v].missing += weight;
continue;
}
/* Magically v value fits to SP_IDX_X, SP_IDX_Y, HG_IDX_X */
- lex_error_expecting (lexer, "HISTOGRAM", "SCATTERPLOT", "BAR", NULL);
+ lex_error_expecting (lexer, "HISTOGRAM", "SCATTERPLOT", "BAR");