struct boxplot *
boxplot_create (double y_min, double y_max, const char *title)
{
+ if (y_min >= y_max)
+ return NULL;
struct boxplot *boxplot = xmalloc (sizeof *boxplot);
chart_item_init (&boxplot->chart_item, &boxplot_class, title);
boxplot->y_min = y_min;
boxplot_add_box (struct boxplot *boxplot,
struct box_whisker *bw, const char *label)
{
+ if (boxplot == NULL)
+ return;
+
struct boxplot_box *box;
if (boxplot->n_boxes >= boxplot->boxes_allocated)
boxplot->boxes = x2nrealloc (boxplot->boxes, &boxplot->boxes_allocated,
boxplot_chart_destroy (struct chart_item *chart_item)
{
struct boxplot *boxplot = to_boxplot (chart_item);
+ if (boxplot == NULL)
+ return;
+
size_t i;
for (i = 0; i < boxplot->n_boxes; i++)
{
struct output_engine *e = engine_stack_top ();
+ if (item == NULL)
+ return;
+
if (is_syntax_item (item))
{
ds_put_cstr (&e->deferred_syntax, text_item_get_text (to_text_item (item)));
AT_CHECK([pspp -o pspp.txt xxx.sps], [0], [ignore])
AT_CLEANUP
+
+
+
+
+AT_SETUP([BOXPLOT Empty])
+AT_DATA([bp.sps],[
+DATA LIST LIST /X * Y * .
+BEGIN DATA
+1
+2
+2
+2
+3
+END DATA
+
+EXAMINE
+ /VARIABLES = Y
+ /PLOT = BOXPLOT.
+])
+
+
+AT_CHECK([pspp -o pspp.txt bp.sps], [0], [ignore])
+
+AT_CLEANUP
+
+
+
+
+
+
+
+
+
+