cairo-fsm: Honor displaying footnote markers as subscripts.
[pspp] / src / output / charts / np-plot-cairo.c
index 8c96b73fadaf517c93a388e8c26f087bf4a7b0ab..aa7d6773481a24b40f00cfec396ad669d34675e7 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2011 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 <config.h>
 
-#include <output/charts/np-plot.h>
+#include "output/charts/np-plot.h"
 
-#include <data/case.h>
-#include <data/casereader.h>
-#include <math/np.h>
-#include <output/cairo-chart.h>
+#include "data/case.h"
+#include "data/casereader.h"
+#include "math/np.h"
+#include "output/cairo-chart.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -37,10 +37,13 @@ np_plot_chart_draw (const struct chart_item *chart_item, cairo_t *cr,
   xrchart_write_title (cr, geom, _("Normal Q-Q Plot of %s"), chart_item->title);
   xrchart_write_xlabel (cr, geom, _("Observed Value"));
   xrchart_write_ylabel (cr, geom, _("Expected Normal"));
-  xrchart_write_xscale (cr, geom,
+  if (! xrchart_write_xscale (cr, geom,
                       npp->x_lower - npp->slack,
-                      npp->x_upper + npp->slack, 5);
-  xrchart_write_yscale (cr, geom, npp->y_first, npp->y_last, 5);
+                              npp->x_upper + npp->slack))
+    return;
+
+  if (! xrchart_write_yscale (cr, geom, npp->y_first, npp->y_last))
+    return;
 
   data = casereader_clone (npp->data);
   for (; (c = casereader_read (data)) != NULL; case_unref (c))
@@ -64,8 +67,10 @@ dnp_plot_chart_draw (const struct chart_item *chart_item, cairo_t *cr,
   xrchart_write_title (cr, geom, _("Detrended Normal Q-Q Plot of %s"), chart_item->title);
   xrchart_write_xlabel (cr, geom, _("Observed Value"));
   xrchart_write_ylabel (cr, geom, _("Dev from Normal"));
-  xrchart_write_xscale (cr, geom, dnpp->y_min, dnpp->y_max, 5);
-  xrchart_write_yscale (cr, geom, dnpp->dns_min, dnpp->dns_max, 5);
+  if (! xrchart_write_xscale (cr, geom, dnpp->y_min, dnpp->y_max))
+    return;
+  if (! xrchart_write_yscale (cr, geom, dnpp->dns_min, dnpp->dns_max))
+    return;
 
   data = casereader_clone (dnpp->data);
   for (; (c = casereader_read (data)) != NULL; case_unref (c))