':param response_list: A list with the responses to graph.'

def __init__(self, w3af, response_list, distance_function=LEVENSHTEIN, custom_code=None):

    self.w3af = w3af
    w3afDotWindow.__init__(self)
    self.widget.connect('clicked', self.on_url_clicked)
    if (distance_function == LEVENSHTEIN):
        dotcode = self._generateDotCode(response_list, distance_function=self._relative_distance)
    elif (distance_function == HTTP_RESPONSE):
        dotcode = self._generateDotCode(response_list, distance_function=self._http_code_distance)
    elif (distance_function == CONTENT_LENGTH):
        dotcode = self._generateDotCode(response_list, distance_function=self._response_length_distance)
    elif (distance_function == CUSTOM_FUNCTION):
        try:
            callable_object = self._create_callable_object(custom_code)
        except Exception as e:
            self.hide()
            msg = ('Please    review    your    customized    code.    An    error    was    raised    while    compiling:    "%s".' % e)
            raise BaseFrameworkException(msg)
        try:
            dotcode = self._generateDotCode(response_list, distance_function=callable_object)
        except Exception as e:
            self.hide()
            msg = 'Please    review    your    customized    code.    An    error    was    raised    on    run    time:    "%s"'
            raise BaseFrameworkException((msg % e))
    else:
        raise Exception('Please    review    your    buggy    code    ;)')
    self.set_filter('neato')
    self.set_dotcode(dotcode)
