def draw(self, can=None):
        "Draw the charts."

        if can == None:
            can = canvas.default_canvas()

        assert self.check_integrity()

        for plot in self.__plots:
            plot.check_integrity()

        self.x_range, self.x_grid_interval = \
            self.__get_data_range(self.x_range, 'X',
                                  self.x_coord,
                                  self.x_grid_interval)

        self.y_range, self.y_grid_interval = \
            self.__get_data_range(self.y_range, 'Y',
                                  self.y_coord,
                                  self.y_grid_interval)

        can.rectangle(self.border_line_style, self.bg_style,
                      self.loc[0], self.loc[1],
                      self.loc[0] + self.size[0], self.loc[1] + self.size[1])

        if not self.x_grid_over_plot:
            self.__draw_x_grid_and_axis(can)

        if not self.y_grid_over_plot:
            self.__draw_y_grid_and_axis(can)

        clipbox = theme.adjust_bounding_box([self.loc[0], self.loc[1],
                                             self.loc[0] + self.size[0],
                                             self.loc[1] + self.size[1]])

        can.clip(clipbox[0], clipbox[1],
                 clipbox[2], clipbox[3])

        for plot in self.__plots:
            plot.draw(self, can)

        can.endclip()

        if self.x_grid_over_plot:
            self.__draw_x_grid_and_axis(can)
        if self.y_grid_over_plot:
            self.__draw_y_grid_and_axis(can)

        if self.legend == _dummy_legend:
            self.legend = legend.T()

        if self.legend:
            legends = []
            for plot in self.__plots:
                entry = plot.get_legend_entry()
                if entry == None:
                    pass
                elif type(entry) != ListType:
                    legends.append(entry)
                else:
                    for e in entry:
                        legends.append(e)
            self.legend.draw(self, legends, can)
Draw the charts.