@Override public void fillDomainGridBand(Graphics2D g2,XYPlot plot,ValueAxis axis,Rectangle2D dataArea,double start,double end){
  double x1=axis.valueToJava2D(start,dataArea,plot.getDomainAxisEdge());
  double x2=axis.valueToJava2D(end,dataArea,plot.getDomainAxisEdge());
  Rectangle2D band;
  if (plot.getOrientation() == PlotOrientation.VERTICAL) {
    band=new Rectangle2D.Double(Math.min(x1,x2),dataArea.getMinY(),Math.abs(x2 - x1),dataArea.getHeight());
  }
 else {
    band=new Rectangle2D.Double(dataArea.getMinX(),Math.min(x1,x2),dataArea.getWidth(),Math.abs(x2 - x1));
  }
  Paint paint=plot.getDomainTickBandPaint();
  if (paint != null) {
    g2.setPaint(paint);
    g2.fill(band);
  }
}

@ Override public void fillDomainGridBand ( Graphics2D g2 , XYPlot plot , ValueAxis axis , Rectangle2D dataArea , double start , double end ) { double x1 = axis . valueToJava2D ( start , dataArea , plot . getDomainAxisEdge ( ) ) ; double x2 = axis . valueToJava2D ( end , dataArea , plot . getDomainAxisEdge ( ) ) ; Rectangle2D band ; if ( plot . getOrientation ( ) == PlotOrientation . VERTICAL ) { band = new Rectangle2D . Double ( Math . min ( x1 , x2 ) , dataArea . getMinY ( ) , Math . abs ( x2 - x1 ) , dataArea . getHeight ( ) ) ; } else { band = new Rectangle2D . Double ( dataArea . getMinX ( ) , Math . min ( x1 , x2 ) , dataArea . getWidth ( ) , Math . abs ( x2 - x1 ) ) ; } Paint paint = plot . getDomainTickBandPaint ( ) ; if ( paint != null ) { g2 . setPaint ( paint ) ; g2 . fill ( band ) ; } }
fills a band between two values on the axis . this can be used to color bands between the grid lines .
