Thanks, Puzzler2018.
Here's some code:
// set window properties
SetWindowTitle( "Graph" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 0, 0, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
setprintsize(20) // 15
#constant GraphX1 230
#constant GraphY1 400
#constant GraphX2 700
#constant GraphY2 600
#constant GraphAxisW 3
#constant GraphDivW 2
#constant GraphDivL 5
iGraphHDivisions = 10
iGraphVDivisions = 10
do
drawbox(GraphX1+GraphDivL,GraphY1,GraphX1+GraphAxisW+GraphDivL,GraphY2-1,makecolor(94,137,26),makecolor(94,137,26),makecolor(114,157,46),makecolor(114,157,46),1) // Vert axis
drawbox(GraphX1+GraphDivL,GraphY2-GraphAxisW,GraphX2,GraphY2,makecolor(94,137,26),makecolor(94,137,26),makecolor(114,157,46),makecolor(114,157,46),1) // Horiz axis
// Vert divisions
iIncrement = (GraphY2-GraphY1)/iGraphVDivisions
for iterDiv = 0 to iGraphVDivisions-1
drawbox(GraphX1,GraphY1+(iterDiv*iIncrement),GraphX1+GraphDivL,GraphY1+(iterDiv*iIncrement)+GraphDivW,makecolor(94,137,26),makecolor(94,137,26),makecolor(114,157,46),makecolor(114,157,46),1)
next iterDiv
sync()
loop
James