add ajax. now the plot can update itself.