import jas.hist.*;
import jas.hep.PartitionAdapter;
import hep.analysis.*;
import javax.swing.*;
import javax.servlet.http.*;

public class Gaussian extends SwingServlet
{
	protected JComponent createComponent(HttpServletRequest req)
	{
		Histogram hist = new Histogram("Title");
		java.util.Random rand = new java.util.Random();
		for (int i=0; i<1000; i++) hist.fill(rand.nextGaussian());
		
		JASHist plot = new JASHist();
		plot.setTitle("Gaussian");
		plot.addData(PartitionAdapter.create(hist.getPartition(),"Title")).show(true);
		return plot;
	}
}
