Difference between revisions of "ApCoCoA-1:GnuPlot.Plot"
From ApCoCoAWiki
m (ApCoCoA:Gnuplot.Plot moved to ApCoCoA:GnuPlot.Plot over redirect) |
m (replaced <quotes> tag by real quotes) |
||
(9 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Version|1}} | ||
<command> | <command> | ||
<title>GnuPlot.Plot</title> | <title>GnuPlot.Plot</title> | ||
− | <short_description>Tries to plot the given data</short_description> | + | <short_description>Tries to plot the given data by using Gnu Plot.</short_description> |
<syntax> | <syntax> | ||
− | GnuPlot.Plot(Data, NumVars) | + | GnuPlot.Plot(Data:LIST, NumVars:INT) |
</syntax> | </syntax> | ||
<description> | <description> | ||
This function tries to plot the input using Gnu Plot. | This function tries to plot the input using Gnu Plot. | ||
− | Data | + | |
+ | <itemize> | ||
+ | <item>@param <em>Data</em> 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 colour 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.</item> | ||
+ | <item>@param <em>NumVars</em> The number of variables; can either be 1 or 2.</item> | ||
+ | </itemize> | ||
<example> | <example> | ||
--Plots some points in red | --Plots some points in red | ||
GnuPlot.Plot([[[[1,1],[2,2],[3,3]],"red","Graph 1"]],1); | GnuPlot.Plot([[[[1,1],[2,2],[3,3]],"red","Graph 1"]],1); | ||
− | + | </example> | |
+ | <example> | ||
--Plots the graph of two polynomials | --Plots the graph of two polynomials | ||
GnuPlot.Plot([[x^2+x+1,"red","Graph 1"],[-3x^2-x-2,"blue","Graph 2"]],1); | GnuPlot.Plot([[x^2+x+1,"red","Graph 1"],[-3x^2-x-2,"blue","Graph 2"]],1); | ||
− | + | </example> | |
+ | <example> | ||
--Plots a rational function in 3D | --Plots a rational function in 3D | ||
GnuPlot.Plot([[x^2+x+1/x^2y^2,"red","Graph 1"]],2); | GnuPlot.Plot([[x^2+x+1/x^2y^2,"red","Graph 1"]],2); | ||
</example> | </example> | ||
</description> | </description> | ||
+ | |||
+ | <types> | ||
+ | <type>plot</type> | ||
+ | </types> | ||
+ | |||
<key>GnuPlot.Plot</key> | <key>GnuPlot.Plot</key> | ||
− | <wiki-category>Package_gnuplot</wiki-category> | + | <key>Plot</key> |
+ | <wiki-category>ApCoCoA-1:Package_gnuplot</wiki-category> | ||
</command> | </command> |
Latest revision as of 13:32, 29 October 2020
This article is about a function from ApCoCoA-1. |
GnuPlot.Plot
Tries to plot the given data by using Gnu Plot.
Syntax
GnuPlot.Plot(Data:LIST, NumVars:INT)
Description
This function tries to plot the input using Gnu Plot.
@param Data 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 colour 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.
@param NumVars The number of variables; can either be 1 or 2.
Example
--Plots some points in red GnuPlot.Plot([[[[1,1],[2,2],[3,3]],"red","Graph 1"]],1);
Example
--Plots the graph of two polynomials GnuPlot.Plot([[x^2+x+1,"red","Graph 1"],[-3x^2-x-2,"blue","Graph 2"]],1);
Example
--Plots a rational function in 3D GnuPlot.Plot([[x^2+x+1/x^2y^2,"red","Graph 1"]],2);