Difference between revisions of "Gnuplot"

From PHYSpedia
Jump to: navigation, search
(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
 +
 
  gnuplot> 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 has great support for all common (and many uncommon) functions. For example, to plot sin(x),
 
  gnuplot> plot sin(x)
 
  gnuplot> plot sin(x)

Revision as of 15:53, 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)

Creating Pictures

Gnuplot Scripts