X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fbarchart.c;h=f3b10011cc959700a156d8b042f820aa9c07f246;hb=d75cdc824bc5170aeaaa76154f22f5c042d5944d;hp=7869d5d6bd4355f71f8e82ee917f43edd95edb19;hpb=43b1296aafe7582e7dbe6c2b6a8b478d7d9b0fcf;p=pspp-builds.git diff --git a/src/output/charts/barchart.c b/src/output/charts/barchart.c index 7869d5d6..f3b10011 100644 --- a/src/output/charts/barchart.c +++ b/src/output/charts/barchart.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2009 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 @@ -141,14 +141,14 @@ draw_barchart(struct chart *ch, const char *title, pl_savestate_r(ch->lp); - draw_tick (ch, TICK_ABSCISSA, x + (interval_size/2 ), + draw_tick (ch, TICK_ABSCISSA, x + (interval_size/2 ), "%s", cat_labels[i]); for(sc = 0 ; sc < SUB_CATAGORIES ; ++sc ) { pl_savestate_r(ch->lp); - pl_fillcolorname_r(ch->lp,data_colour[sc]); + pl_fillcolorname_r(ch->lp,data_colour[sc % N_CHART_COLOURS]); switch ( opt ) { @@ -202,7 +202,7 @@ draw_barchart(struct chart *ch, const char *title, pl_restorestate_r(ch->lp); - chart_write_title(ch, title); + chart_write_title(ch, "%s", title); write_legend(ch);