Table of Contents

Class: BarChartDistribution Bio/Graphics/Distribution.py

Display the distribution of values as a bunch of bars.

Methods   
__init__
_determine_position
_draw_title
draw
  __init__ 
__init__ ( self,  display_info=[] )

Initialize a Bar Chart display of distribution info.

Class attributes:

  • 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.

  _determine_position 
_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 
_draw_title (
        self,
        cur_drawing,
        title,
        start_x,
        start_y,
        end_x,
        end_y,
        )

Add the title of the figure to the drawing.

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

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


Table of Contents

This document was automatically generated on Mon Jul 1 12:03:12 2002 by HappyDoc version 2.0.1