/* PSPP - draws pie charts of sample statistics
Copyright (C) 2004 Free Software Foundation, Inc.
-Written by John Darrington <john@darrington.wattle.id.au>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
02110-1301, USA. */
-#include "config.h"
-#include "piechart.h"
-#include "chart.h"
+#include <config.h>
+
#include <float.h>
#include <assert.h>
#include <math.h>
#include <stdio.h>
-#include "str.h"
-#include "value-labels.h"
-#include "misc.h"
-#include "plot-chart.h"
+
+
+#include <output/charts/piechart.h>
+#include <output/charts/plot-chart.h>
+
+#include <output/chart.h>
+#include <libpspp/str.h>
+#include <data/value-labels.h>
+
+#include "minmax.h"
+
/* Pie charts of course need to know Pi :) */
#ifndef M_PI
const double centre_x = (ch->data_right + ch->data_left ) / 2.0 ;
const double centre_y = (ch->data_top + ch->data_bottom ) / 2.0 ;
- const double radius = min(
+ const double radius = MIN(
5.0 / 12.0 * (ch->data_top - ch->data_bottom),
1.0 / 4.0 * (ch->data_right - ch->data_left)
);