Norman Khine wrote: > thank you, it was simpler than what i was trying to do, here is the > revised version: > > http://pastie.org/2115586 > > one thing i am getting an error is on like 103, in that if, i change > (http://pastie.org/2115615): > > -plt.legend(('Income - GBP', 'Discounts', 'Google AdWords - GBP', > 'Commission - %s GBP' % (total_commission)), > +plt.legend(('Income - GBP', 'Discounts', 'Google AdWords - %s GBP', > 'Commission - %s GBP' % (total_adwords, total_commission)), > 'upper right', shadow=True) > > i get the following traceback: > > Traceback (most recent call last): > File "commission.py", line 119, in <module> > plt.legend(('Income - GBP', 'Discounts', 'Google AdWords - %s > GBP', 'Commission - %s GBP' % (total_adwords, total_commission)), > TypeError: not all arguments converted during string formatting > > what am i missing?
'Commission - %s GBP' % (total_adwords, total_commission)) Two items in the tuple but only one '%s' in the format string. You probably wanted ... 'Google AdWords - %s GBP' % total_adwords, 'Commission - %s GBP' % total_commission ... _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor