Difference between revisions of "Gnuplot"
From PHYSpedia
(→Plotting) |
(→Plotting) |
||
Line 1: | Line 1: | ||
==Plotting== | ==Plotting== | ||
gnuplot is a program created to plot stuff. You can plot functions or data. There are two commands for plotting, <code>plot</code> and <code>splot</code>. <code>plot</code> is used to plot 2D functions while <code>splot</code> is used to plot 3D functions. The <code>plot</code> command has the following form | gnuplot is a program created to plot stuff. You can plot functions or data. There are two commands for plotting, <code>plot</code> and <code>splot</code>. <code>plot</code> is used to plot 2D functions while <code>splot</code> is used to plot 3D functions. The <code>plot</code> command has the following form | ||
− | plot [ function | 'filename' ] [ modifiers ] | + | gnuplot> plot [ function | 'filename' ] [ modifiers ] |
+ | gnuplot has great support for all common (and many uncommon) functions. For example, to plot sin(x), | ||
+ | gnuplot> plot sin(x) | ||
+ | Multiple functions can be plotted on the same graph, just separate each with a comma | ||
+ | gnuplot> plot sin(x), cos(x) | ||
==Creating Pictures== | ==Creating Pictures== | ||
==Gnuplot Scripts== | ==Gnuplot Scripts== |
Revision as of 14:52, 12 March 2012
Plotting
gnuplot is a program created to plot stuff. You can plot functions or data. There are two commands for plotting, plot
and splot
. plot
is used to plot 2D functions while splot
is used to plot 3D functions. The plot
command has the following form
gnuplot> plot [ function | 'filename' ] [ modifiers ]
gnuplot has great support for all common (and many uncommon) functions. For example, to plot sin(x),
gnuplot> plot sin(x)
Multiple functions can be plotted on the same graph, just separate each with a comma
gnuplot> plot sin(x), cos(x)