10.19. Plotting

LinePlot
LinePlot (func1,func2,func3,...)
LinePlot (func1,func2,func3,x1,x2,y1,y2)

Plot a function (or several functions) with a line. First up to 10 arguments are functions, then optionally you can specify the limits of the plotting window as x1, x2, y1, y2. If limits are not specified, then the currently set limits apply (See LinePlotWindow)

Examples:

genius> LinePlot(sin,cos)
genius> LinePlot(`(x)=x^2,-1,1,0,1)

LinePlotClear
LinePlotClear ()

Show the line plot window and clear out functions and any other lines that were drawn.

LinePlotDrawLine
LinePlotDrawLine (x1,y1,x2,y2,...)
LinePlotDrawLine (v,...)

Draw a line from x1,y1 to x2,y2. x1,y1, x2,y2 can be replaced by an n by 2 matrix for a longer line.

Extra parameters can be added to specify line color and thickness, by adding a string "color" or "thickness" and the color and thickness after as a string or integer respectively.

Examples:

genius> LinePlotDrawLine(0,0,1,1,"color","blue","thickness",3)
genius> LinePlotDrawLine([0,0;1,-1;-1,-1])

LinePlotParametric
LinePlotParametric (xfunc,yfunc,...)
LinePlotParametric (xfunc,yfunc,t1,t2,tinc)
LinePlotParametric (xfunc,yfunc,t1,t2,tinc,x1,x2,y1,y2)

Plot a parametric function with a line. First come the functions for x and y then optionally the t limits as t1,t2,tinc, then optionally the limits as x1,x2,y1,y2.

LinePlotCParametric
LinePlotCParametric (func,...)
LinePlotCParametric (func,t1,t2,tinc)
LinePlotCParametric (func,t1,t2,tinc,x1,x2,y1,y2)

Plot a parametric complex valued function with a line. First comes the function that returns x+iy then optionally the t limits as t1,t2,tinc, then optionally the limits as x1,x2,y1,y2.

SurfacePlot
SurfacePlot (func)
SurfacePlot (func,x1,x2,y1,y2,z1,z2)

Plot a surface function which takes either two arguments or a complex number. First comes the function then optionally limits as x1, x2, y1, y2, z1, z2. If limits are not specified, then the currently set limits apply (See SurfacePlotWindow). Genius can only plot a single surface function at this time.

Examples:

genius> SurfacePlot(|sin|,-1,1,-1,1,0,1.5)
genius> SurfacePlot(`(x,y)=x^2+y,-1,1,-1,1,-2,2)
genius> SurfacePlot(`(z)=|z|^2,-1,1,-1,1,0,2)