Functions > Plotting
To get a start with plotting, read the tutorial on plotting.
The following functions are described in this section:
|01. addplot||02. copyplot||03. createplot||04. plot|
|05. removeplot||06. showplot|
Available since version 184.108.40.206. Used to add plot data to the Plot object created using the createplot function. Its format is:
addplot(plot, xValues, yValues, [rotation], [line_thickness], [color], [xTranslate],[yTranslate],[fillColor])
The parameters inside  brackets are optional. If you want to use an optional parameter, you will have to provide all preceding optional parameters. The last 3 parameters are available since v.220.127.116.11.
The 'color' values can be: (1) a color name such as 'red' (2) an empty string to use MP provided color; or (3) a string containing (A)RGB value as a comma delimitted string. (A)RGB stands for Alpha (i.e. transparency), Red, Green and Blue. Each of the values is a number between 0 and 255. Providing 0 for aplha means fully transparent and 255 means fully opaque. The values in between are for semi transparent colors.
The built-in examples folder show very detailed examples of plotting routines. Please refer to built-in examples for further details.
Available since version 18.104.22.168. Creates a copy of an existing Plot object. Expects a single Plot object as parameter and returns a new Plot object that's exactly like the first object, except that the two are totally different objects independent of each other. Example:
p = copyplot(old_plot)
Available since version 22.214.171.124. Creates a new Plot object. You can then add as many line graphs to this object as you wish. The function does not expect any parameters.
Deprecated since v.126.96.36.199. This is the old plot function. Prior to version 188.8.131.52, this was the only plotting routine. New programs should use the new plot fucntions - createplot(), addplot() and then showplot().
Available since version 184.108.40.206. Removes one or more plot curves from an existing Plot object using their 0 based indexes.
Available since version 220.127.116.11. Displays an existing plot. The syntax is:
showplot(plot_object, [rotation], [scaleX], [scaleY])
The parameters inside  brackets are optional. If you want to use an optional parameter, you will have to provide all preceding optional parameters.
Spirograph (desktop) v-18.104.22.168 was released on April 23, 2015. Improvements include: