'Generate the dotcode for the current window, based on all the responses.
:param response_list: A list with the responses.'

def _generateDotCode(self, response_list, distance_function=relative_distance):

    dotcode = 'graph    G    {graph    [    overlap="scale"    ]\n'
    for response in response_list:
        dotcode += (((str(response.get_id()) + '    [URL="') + str(response.get_id())) + '"];\n')
    dist_dict = {}
    for (r1, r2) in self._xunique_combinations(response_list, 2):
        dist_dict[(r1, r2)] = distance_function(r1, r2)
    dist_dict = self._normalize_distances(dist_dict)
    for (r1, r2) in dist_dict:
        distance = dist_dict[(r1, r2)]
        dotcode += (((((str(r1.get_id()) + '    --    ') + str(r2.get_id())) + '    [len=') + str(distance)) + ',    style=invis];\n')
    dotcode += '}'
    return dotcode
