XYAxis yAxis = frame.getYAxis();
yAxis.setPreferredSize(new Dimension(75, 50));
xAxis.setStartMargin(75);
((LinearXYAxis) yAxis).setFormat(new ChoiceFormat(new double[] {-Double.POSITIVE_INFINITY, 0, 1, 2, 2.000001}, new String[] {"", "red",
"green", "blue", ""}));
((LinearXYAxis) yAxis).setTickMarkCalculator(new IntegerTickMarkCalculator());
final LinearXYPlotLine line = new LinearXYPlotLine(xAxis, yAxis, XYDimension.X);
line.setForeground(Color.white);
line.setLineMode(LineMode.STEP_YX);
final SimpleXYDataset d = new SimpleXYDataset(line);
d.setMaxCapacity(1000);