def genChart(width, height, data, ind, outfile, title): # this is designed to take a list, the value of the wshed, and save the output graph mn = min(data) mx = max(data) chart = XYLineChart(width, height, title=title, x_range=(0, len(data)), y_range=(0, mx)) chart.set_colours(["3072F3", "FF0000"]) chart.set_line_style(0, 3) chart.set_grid(20, 25, 1, 5) # set up axis and labels left_axis = chart.set_axis_labels(Axis.LEFT, [" Lowest", "Total Toxicity ", " Highest"]) chart.set_axis_style(left_axis, "202020", font_size=11, alignment=0) # add x and y data for distribution line chart.add_data(range(len(data))) chart.add_data(data) # add marker to position of ind chart.add_marker(0, ind, "d", "FF0000", 10) chart.download(outfile) return outfile