def draw_table_price(): pl.ioff() contents = readfile.readfile("000007.csv") high, low = readfile.get_prices(contents) ranges = range(len(contents)) prices = [ content[2] for content in contents ] pl.plot(ranges, prices, color="red") #pl.plot([(float(low) - float(low)*0.02), (float(high) + float(high)*0.02)]) pl.plot([float(low), float(high)]) pl.title("Hello world") pl.show()
def draw_table_vol(): pl.ioff() contents = readfile.readfile("000007.csv") high, low = readfile.get_prices(contents) ranges = range(len(contents)) prices = [content[2] for content in contents] table_x = list() table_y = list() high, low = readfile.get_vol(contents) for x, content in enumerate(contents): table_x.append(x) table_y.append(float(content[1])) pl.plot(table_x, table_y, "-") pl.show()