}
#endif
-/*
- These colours come from:
+/*
+ These colours come from:
http://tango.freedesktop.org/static/cvs/tango-art-tools/palettes/Tango-Palette.gpl */
const struct xrchart_colour data_colour[XRCHART_N_COLOURS] =
{
if (orientation == SCALE_ABSCISSA)
{
- if ( rotated)
+ if ( rotated)
xrchart_label_rotate (cr, 'l', 'c', geom->font_size, s, -G_PI_4);
else
xrchart_label (cr, 'c', 't', geom->font_size, s);
tick_format_string = chart_get_ticks_format (lower, interval, ticks, &tickscale);
upper = lower + interval * (ticks+1);
-
+
geom->axis[orient].max = upper;
geom->axis[orient].min = lower;
-
- geom->axis[orient].scale = (fabs (geom->axis[orient].data_max - geom->axis[orient].data_min)
- / fabs (geom->axis[orient].max - geom->axis[orient].min));
+
+ struct xrchart_axis *axis = &geom->axis[orient];
+ geom->axis[orient].scale = (fabs ((double) axis->data_max - axis->data_min)
+ / fabs (axis->max - axis->min));
if (orient == SCALE_ABSCISSA)
{
tickoversize = width > 0.9 *
((double)(geom->axis[SCALE_ABSCISSA].data_max - geom->axis[SCALE_ABSCISSA].data_min))/(ticks+1);
}
-
+
double pos = lower;
for (s = 0 ; s <= ticks; ++s)