Difference between revisions of "Gnuplot"

From PHYSpedia
Jump to: navigation, search
(Plotting)
Line 1: Line 1:
Gnuplot is a terminal based plotting application. This means that you interact with gnuplot by typing commands at a prompt.
+
Gnuplot is a terminal based plotting application. This means that you interact with gnuplot by ''typing commands at a prompt''. This turns out to be very convenient, because it means that you can always save or create a gnuplot configuration into a plain text file.
 +
 
 
==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

Revision as of 15:56, 12 March 2012

Gnuplot is a terminal based plotting application. This means that you interact with gnuplot by typing commands at a prompt. This turns out to be very convenient, because it means that you can always save or create a gnuplot configuration into a plain text file.

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)

We control the

Creating Pictures

Gnuplot Scripts