Asrarahmed Kadri wrote: > As far as I understand, I need to design an algorithm which computes > the padding between each bar (space between each bar) and the length > of each bar ( remember that this is a HORIZONTAL BAR CHART). I think what you want to design is an algorithm that computes the HEIGHT of each bar (as it's a HORIZONTAL bar chart) because the vertical padding, (The space between each bar) is a fixed number, like 20 pixels. At least that's what i would do. This height is dependent upon the number of data sets you have.
For the width of the bars (remember this is a horizontal bar chart, so the heights of the bars will all be the same, but the widths will be different) you will want to set it up so that the largest data value is set to the widest bar, and the rest are percentages of this width. I hope that helps. -Luke _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor