The labels of piechart slices did not match the positions
of the slices (possibly due to libplot legacy). This
change fixes this problem.
const double segment_angle =
pie->slices[i].magnitude / total_magnitude * 2 * M_PI ;
- const double label_x = centre_x -
- radius * sin(angle + segment_angle/2.0);
+ const double label_x = centre_x +
+ radius * cos (angle + segment_angle/2.0);
const double label_y = centre_y +
- radius * cos(angle + segment_angle/2.0);
+ radius * sin (angle + segment_angle/2.0);
/* Fill the segment */
draw_segment (cr,