var win = Ti.UI.currentWindow;

var webView = Ti.UI.createWebView({
	url: 'plot.html'
}
);
win.add(webView);

webView.addEventListener('load', function(){
	webView.evalJS('weights =' + win.weights);
	webView.evalJS('ticks =' +  win.ticks);
	webView.evalJS('setting.xaxis.ticks = ticks;');
	webView.evalJS('$.plot($("#graph"),[{data: weights, color: 2}], setting);');	
});
