# Difference between revisions of "Help:Plots"

From OpenWetWare

(New page: Plots can be made using [http://www.gnuplot.info/ gnuplot] on the wiki. The syntax is as follows: <pre> <plot> plot [-pi:pi][-1:1] sin(x) </plot> </pre> <plot> plot [-pi:pi][-1:1] sin(x)...) |
|||

(2 intermediate revisions by 2 users not shown) | |||

Line 1: | Line 1: | ||

+ | <font size=1>< [[Help:Contents|Help]]</font> | ||

+ | |||

+ | See also: [[Help:Charts| Using Google charts on OWW.]] | ||

+ | |||

+ | |||

Plots can be made using [http://www.gnuplot.info/ gnuplot] on the wiki. The syntax is as follows: | Plots can be made using [http://www.gnuplot.info/ gnuplot] on the wiki. The syntax is as follows: | ||

Line 59: | Line 64: | ||

</plot> | </plot> | ||

</pre> | </pre> | ||

+ | |||

+ | A 3D plot: | ||

+ | <pre> | ||

+ | <plot> | ||

+ | set contour base | ||

+ | set nokey | ||

+ | splot [-12:12.01] [-12:12.01] sin(sqrt(x**2+y**2)) / sqrt(x**2+y**2) | ||

+ | </plot> | ||

+ | </pre> | ||

+ | <plot> | ||

+ | set contour base | ||

+ | set nokey | ||

+ | splot [-12:12.01] [-12:12.01] sin(sqrt(x**2+y**2)) / sqrt(x**2+y**2) | ||

+ | </plot> |

## Latest revision as of 23:13, 21 December 2008

< Help

See also: Using Google charts on OWW.

Plots can be made using gnuplot on the wiki. The syntax is as follows:

<plot> plot [-pi:pi][-1:1] sin(x) </plot>

<plot> plot [-pi:pi][-1:1] sin(x) </plot>

Note that gnuplot has MANY options so read it the manual to understand what you can do. To plot data, you can incorporate the data inline like such:

<plot> plot "-" title "stupid plot 1" with lines, "-" title "stupid plot 2" with lines 1 1 2 2 3 3 4 4 5 3 6 2 7 1 e 1 3 2 4 3 3 4 2 5 1 6 2 7 3 e </plot>

<plot> plot "-" title "stupid plot 1" with lines, "-" title "stupid plot 2" with lines 1 1 2 2 3 3 4 4 5 3 6 2 7 1 e 1 3 2 4 3 3 4 2 5 1 6 2 7 3 e </plot>

You can also upload a data file, for example, at File:MyData.txt and include it in a plot as follows

<plot data="MyData.txt"> plot "MyData.txt" title "my data" using 1:4 </plot>

A 3D plot:

<plot> set contour base set nokey splot [-12:12.01] [-12:12.01] sin(sqrt(x**2+y**2)) / sqrt(x**2+y**2) </plot>

<plot> set contour base set nokey splot [-12:12.01] [-12:12.01] sin(sqrt(x**2+y**2)) / sqrt(x**2+y**2) </plot>