public void writeGraphic(final String filename){
  try {
    ChartUtilities.saveChartAsPNG(new File(filename),getGraphic(),1024,768);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

public void writeGraphic ( final String filename ) { try { ChartUtilities . saveChartAsPNG ( new File ( filename ) , getGraphic ( ) , 1024 , 768 ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
writes a graphic showing the number of departures , arrivals and vehicles en route of all legs / trips to the specified file .
