//@code objref g //Creates an object reference "g" which will //point to the graph object. g = new Graph() //Assigns "g" the role of pointing to a Graph //created from the Graph class, and produces //a graph window with x and y axes on the //screen. g.size(-4,4,-4,4) //sizes the window to fit the graph t = 0 //Declares t as a possible variable g.addexpr("3*sin(t)") //stores 3*sin(t) as a function to be plotted in g graphs g.color(3) //the next graph will be drawn in blue g.addexpr("3*sin(2*t)") //stores 3*sin(2*t) as a function to be plotted g.xexpr("3*cos(t)") //stores 3*cos(t) as the x function to be plotted in g graphs //sin(x) becomes the y function g.begin() //Tells the interpreter that commands to plot //specific functions will follow. for(t=0; t<=2*PI+0.1; t=t+0.1){ //States that x values to be plotted //will go from 0 to 10 in increments //of 0.1. g.plot(t) //States that the y values on the plot //will be the sin of the x values. } g.flush() //Actually draws the plot on the graph in the window.