X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Froc-chart-cairo.c;h=910d6152f0a7f64140b67cae932aa60a9bc7a652;hb=237ba2110e3ceef00deffa01bd87189a269ca387;hp=b5c22aca5329a8e3a1af7c0449f2d8a323c1a92c;hpb=d0b91eae59319ab2756d0d43b9cb15eb9cd3c234;p=pspp diff --git a/src/output/charts/roc-chart-cairo.c b/src/output/charts/roc-chart-cairo.c index b5c22aca53..910d6152f0 100644 --- a/src/output/charts/roc-chart-cairo.c +++ b/src/output/charts/roc-chart-cairo.c @@ -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 @@ -16,31 +16,33 @@ #include -#include +#include "output/charts/roc-chart.h" -#include -#include -#include -#include +#include "data/case.h" +#include "data/casereader.h" +#include "language/stats/roc.h" +#include "output/cairo-chart.h" #include "gettext.h" #define _(msgid) gettext (msgid) void -xrchart_draw_roc (const struct chart_item *chart_item, cairo_t *cr, +xrchart_draw_roc (const struct chart *chart, cairo_t *cr, struct xrchart_geometry *geom) { - const struct roc_chart *rc = to_roc_chart (chart_item); + const struct roc_chart *rc = to_roc_chart (chart); size_t i; xrchart_write_title (cr, geom, _("ROC Curve")); xrchart_write_xlabel (cr, geom, _("1 - Specificity")); xrchart_write_ylabel (cr, geom, _("Sensitivity")); - xrchart_write_xscale (cr, geom, 0, 1, 5); - xrchart_write_yscale (cr, geom, 0, 1, 5); + if (! xrchart_write_xscale (cr, geom, 0, 1)) + return; + if (! xrchart_write_yscale (cr, geom, 0, 1)) + return; - if ( rc->reference ) + if (rc->reference) { xrchart_line (cr, geom, 1.0, 0, 0.0, 1.0,