//@code objref g g = new Graph() g.size(0, 10, -1, 1) g.addexpr("sin(x)") //stores sin(x) as a function to be plotted in g g.addexpr("cos(x)") //stores cos(x) for use with g g.addexpr("exp(-x)") //stores exp(x) for use with g x=0 g.begin() //The next g.plot command will move the drawing pens // for the three curves to indicated x position for(x=0; x<=10; x=x+0.1){ g.plot(x) // The x value used for each expression in the // addexpr list } g.flush()