timer.setRepeats(true);
timer.start();
}
CoordinateSystemXY system = new CoordinateSystemXY(model);
// system.setRenderer(new SimpleAxisRenderer());
BasicChart chart = new BasicChart(system.getModel(), system);
chart.setShowLegend(false);
chart.setPlotterForSeries(system.getModel().getSeries(1), new NullPlot());
system.setAxis(0, new SteppingAxis(new LinearAxis(), 0, 0.1));
Point2D start = new Point2D.Float(0, 0);
Point2D end = new Point2D.Float(50, 50);
float[] dist = { 0.0f, 0.2f, 0.7f, 1.0f };
Color[] c = { Color.RED, Color.WHITE, Color.BLUE, Color.green };
LinearGradientPaint p =
new LinearGradientPaint(start, end, dist, c, CycleMethod.REPEAT);
chart.setPlotterForSeries(system.getModel().getSeries(2),
new TwoSeriesAreaLinePlot(system.getModel().getSeries(1), p));
frame.add(new JScrollPane(chart), BorderLayout.CENTER);
frame.setVisible(true);
}