Difference between revisions of "ApCoCoA-1:GnuPlot.Plot"
From ApCoCoAWiki
(New page: <command> <title>GnuPlot.Plot</title> <short_description>Tries to plot the given data</short_description> <syntax> GnuPlot.Plot(Data, NumVars) </syntax> <description> This func...) |
|||
Line 7: | Line 7: | ||
<description> | <description> | ||
This function tries to plot the input using Gnu Plot. | This function tries to plot the input using Gnu Plot. | ||
− | Data itself is a list containing the description of the graphs to be plotted simultaneously. One of these data elements is composed of a list with three entries. The first entry is the actual data. The second entry is a string that selects the color used for drawing the graph (e.g. "green") and the third entry specifies the | + | Data itself is a list containing the description of the graphs to be plotted simultaneously. One of these data elements is composed of a list with three entries. The first entry is the actual data. The second entry is a string that selects the color used for drawing the graph (e.g. "green", "yellow", ...) and the third entry specifies the key which will be displayed in the drawing. The actual data can be a list of points or a polynomial/ rational function in the variables x and y. NumVars can either be 1 or 2 and specifies the number of variables. |
<example> | <example> |
Revision as of 11:57, 30 November 2008
GnuPlot.Plot
Tries to plot the given data
Syntax
GnuPlot.Plot(Data, NumVars)
Description
This function tries to plot the input using Gnu Plot.
Data itself is a list containing the description of the graphs to be plotted simultaneously. One of these data elements is composed of a list with three entries. The first entry is the actual data. The second entry is a string that selects the color used for drawing the graph (e.g. "green", "yellow", ...) and the third entry specifies the key which will be displayed in the drawing. The actual data can be a list of points or a polynomial/ rational function in the variables x and y. NumVars can either be 1 or 2 and specifies the number of variables.
Example
--Plots some points in red GnuPlot.Plot([[[[1,1],[2,2],[3,3]],"red","Graph 1"]],1); --Plots the graph of two polynomials GnuPlot.Plot([[x^2+x+1,"red","Graph 1"],[-3x^2-x-2,"blue","Graph 2"]],1); --Plots a rational function in 3D GnuPlot.Plot([[x^2+x+1/x^2y^2,"red","Graph 1"]],2);