Package Bio :: Package Graphics :: Module Distribution :: Class BarChartDistribution
[show private | hide private]
[frames | no frames]

Class BarChartDistribution


Display the distribution of values as a bunch of bars.
Method Summary
  __init__(self, display_info)
Initialize a Bar Chart display of distribution info.
  draw(self, cur_drawing, start_x, start_y, end_x, end_y)
Draw a bar chart with the info in the specified range.
  _determine_position(self, start_x, start_y, end_x, end_y)
Calculate the position of the chart with blank space.
  _draw_title(self, cur_drawing, title, start_x, start_y, end_x, end_y)
Add the title of the figure to the drawing.

Method Details

__init__(self, display_info=[])
(Constructor)

Initialize a Bar Chart display of distribution info.

Class attributes:

o display_info - the information to be displayed in the distribution. This should be ordered as a list of lists, where each internal list is a data set to display in the bar chart.

draw(self, cur_drawing, start_x, start_y, end_x, end_y)

Draw a bar chart with the info in the specified range.

_determine_position(self, start_x, start_y, end_x, end_y)

Calculate the position of the chart with blank space.

This uses some padding around the chart, and takes into account whether the chart has a title. It returns 4 values, which are, in order, the x_start, x_end, y_start and y_end of the chart itself.

_draw_title(self, cur_drawing, title, start_x, start_y, end_x, end_y)

Add the title of the figure to the drawing.

Generated by Epydoc 2.1 on Sat Jul 16 15:49:00 2005 http://epydoc.sf.net