from pychart import *
import sys

theme.get_options()

can = canvas.default_canvas()
size = (300, 200)
ar = area.T(size = size, legend=None, y_range = (9000, 9500),
            x_axis = axis.X(format="7//%d//2002", label="Date"),
            y_axis = axis.Y(format="%d", label="Dow Jones"))
ar.add_plot(line_plot.T(data=[ [1,9379], [2, 9054], [3, 9007], [4, 9109], [5, 9243] ]))
            
ar.draw()
can.show(ar.x_pos(4), ar.y_pos(9070), "/a45{}Dow Jones")

ar = area.T(size = size, legend=None, y_range = (940, 990),
            x_axis = None, y_axis = axis.Y(format="%d", offset=300, tic_len=-6,
                                           label_offset=(50, 0),
                                           label="S&P 500"))
ar.add_plot(line_plot.T(data=[ [1,989], [2, 953], [3, 948], [4, 968], [5, 989] ]))
            
ar.draw()

can.show(ar.x_pos(4), ar.y_pos(970), "/a50{}S&P 500")




