Fixed bugs in Grapher.java