import java.applet.*;
import java.awt.*;
import JSci.awt.*;
import JSci.maths.chaos.*;

/**
* Plot of the Standard map.
* @author Mark Hale
* @version 1.0
*/
public final class StandardPlot extends Applet {
        private StandardMap cm;
        private ScatterGraph graph;
        private final int N=10000;
        public void init() {
                cm=new StandardMap(0.8);
                float data[][]=new float[2][N];
                double x[]={0.1,0.1};
                for(int i=0;i<N;i++) {
                        data[0][i]=(float)x[0];
                        data[1][i]=(float)x[1];
                        x=cm.map(x);
                }
                DefaultGraph2DModel model=new DefaultGraph2DModel();
                model.setXAxis(data[0]);
                model.addSeries(data[1]);
                graph=new ScatterGraph(model);
                graph.setNumbering(false);
                setLayout(new BorderLayout());
                add(graph,"Center");
        }
}

