private void drawYTickMarks(Graphics g){
  Rectangle plotRect=getPlotRect();
  int xPos=plotRect.x;
  NumberFormat nf=NumberFormat.getInstance();
  nf.setMinimumFractionDigits(1);
  nf.setMaximumFractionDigits(1);
  for (double d=0.0; d <= 1.0; d+=0.1) {
    int yPos=getYPos(d);
    g.setColor(boundaryColor);
    g.drawLine(xPos,yPos,xPos + 10,yPos);
    String str=nf.format(d);
    int strWid=fm.stringWidth(str);
    int strHgt=fm.getAscent();
    g.drawString(str,xPos - strWid - 5,yPos + strHgt / 2);
  }
}

private void drawYTickMarks ( Graphics g ) { Rectangle plotRect = getPlotRect ( ) ; int xPos = plotRect . x ; NumberFormat nf = NumberFormat . getInstance ( ) ; nf . setMinimumFractionDigits ( 1 ) ; nf . setMaximumFractionDigits ( 1 ) ; for ( double d = 0.0 ; d <= 1.0 ; d += 0.1 ) { int yPos = getYPos ( d ) ; g . setColor ( boundaryColor ) ; g . drawLine ( xPos , yPos , xPos + 10 , yPos ) ; String str = nf . format ( d ) ; int strWid = fm . stringWidth ( str ) ; int strHgt = fm . getAscent ( ) ; g . drawString ( str , xPos - strWid - 5 , yPos + strHgt / 2 ) ; } }
draws tick marks for the y axis .
