Sub DrawFormatedLine (x1,y1,x2,y2) ' slightly convert values to fit screen with zooming DrawLine(x1*50+100,y1*50+75,x2*50+100,y2*50+75) End Sub FromX = -10 ToX = 15 StepX = 0.05 Ax = FromX ' prev value Ay = Sin(Ax) ' prev value SetPenColor(Rgb(0,0,150)) DrawFormatedLine (-10,0,15,0) ' Draw X accis DrawFormatedLine (0,-3,0,3) ' Draw y accis SetPenColor(Rgb(200,0,0)) For x=FromX to ToX Step StepX y = Sin(x) DrawFormatedLine(Ax,Ay, x,y) Ax = x Ay = y Next SetPenColor Rgb(0,150,0) DrawText "Press a key to exit",450,185 while not readkey wend