<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fourier.fhsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rthomas</id>
		<title>PHYSpedia - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://fourier.fhsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rthomas"/>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php/Special:Contributions/Rthomas"/>
		<updated>2026-04-17T03:57:33Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=623</id>
		<title>Computational Physics Links</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=623"/>
				<updated>2014-01-26T02:03:19Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Computational Physics at U. of Buffalo [http://www.physics.buffalo.edu/phy410-505/index.html]&lt;br /&gt;
&lt;br /&gt;
Computational Physics at Old Dominion U. [http://ww2.odu.edu/~agodunov/teaching/notes/]&lt;br /&gt;
&lt;br /&gt;
Computational Physics at U. of Texas - Austin (includes git repository of source) [http://farside.ph.utexas.edu/teaching/329/329.html]&lt;br /&gt;
&lt;br /&gt;
CFD-Online Wiki (Numerous Codes and Tutorials [http://www.cfd-online.com/Wiki/Main_Page]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Data_Analysis&amp;diff=622</id>
		<title>Data Analysis</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Data_Analysis&amp;diff=622"/>
				<updated>2014-01-26T02:00:58Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Evaluating and Expressing Uncertainty in Measurements (Lecture Slides)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Link:  [[File:Uncertainty_Lecture.pdf]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NIST Guide for Uncertainty of Measurement&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Link:  [[http://physics.nist.gov/cuu/Uncertainty/  http://physics.nist.gov/cuu/Uncertainty/]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;g3data - Extract Data from Graph Images&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Link:  [[http://www.frantz.fi/software/g3data.php/  http://www.frantz.fi/software/g3data.php]]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=621</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=621"/>
				<updated>2014-01-24T15:33:51Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Latex is a program for typesetting papers. It is very good at typesetting math, so it is commonly used in fields that require equations to be displayed in papers.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
To start writing Latex documents, you two things. A Latex ''compiler'' (this is a set of programs and files that allow you to generate pdfs from a Latex file), and a Latex ''editor'' (you can use a plain text editor, but an editor designed for Latex will have many more handy features). There are a few different Latex compilers and editors. The instructions below are to install the texlive compiler and texmaker editor.&lt;br /&gt;
;Windows&lt;br /&gt;
:#download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
:#configure texmaker: go to toolbar, choose options/quick build/User, add the following text&lt;br /&gt;
 latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps&lt;br /&gt;
&lt;br /&gt;
;Mac&lt;br /&gt;
:#Follow the instructions here http://www.tug.org/mactex/2011/&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
&lt;br /&gt;
;Ubuntu Linux&lt;br /&gt;
:use synaptic to install the texmaker which will automatically install texlive as well&lt;br /&gt;
 &amp;gt; sudo apt-get install texmaker&lt;br /&gt;
&lt;br /&gt;
You may also want to to install the REVTeX package (https://authors.aps.org/revtex4/). Many APS journals use a style included in this package. However, it is not necessary to do this before starting to use Latex.&lt;br /&gt;
For more information on installing custom document and bibliography styles, see http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html&lt;br /&gt;
&lt;br /&gt;
See section below for additional common formats.&lt;br /&gt;
&lt;br /&gt;
Here is a template that can be used for Advanced Lab: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)&lt;br /&gt;
&lt;br /&gt;
== Using LaTeX ==&lt;br /&gt;
===External References===&lt;br /&gt;
There are many, many different websites full of tutorials and references for Latex. Here are a couple of good ones.&lt;br /&gt;
&lt;br /&gt;
LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX&lt;br /&gt;
&lt;br /&gt;
LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html&lt;br /&gt;
&lt;br /&gt;
===Simple Tasks===&lt;br /&gt;
Latex is basically a language for &amp;quot;marking up&amp;quot; plain text to indicate how it should be formatted. The Latex compiler reads the marked up text and generate the output that is indicated. In Latex terminology, the user used '''commands''' to tell the Latex compiler what to do. Latex commands start with an '\'. For example, the latex command to create the Greek letter alpha (in math mode) is &amp;lt;code&amp;gt;\alpha&amp;lt;/code&amp;gt;. Some commands take arguments. These arguments are given to the command inside of curly brackets {}. For example, the Latex command to bold face some text is &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt;, and this command takes one argument, the text to bold face; &amp;lt;code&amp;gt;\textbf{make this bold}&amp;lt;/code&amp;gt;. Some commands take ''optional'' arguments. These arguments are given in square brakets [].&lt;br /&gt;
&lt;br /&gt;
A bare Latex document must declare the document class and have a document environment. These are specified with the &amp;lt;code&amp;gt;\documentclass&amp;lt;/code&amp;gt; command and a &amp;lt;code&amp;gt;\begin{document}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; commands.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
By default, Latex has a lot of useful features, but you will quickly find yourself needing to do something that is not possible with plain Latex. Latex allows you to use ''packages'' that have extra functionality. These packages are similar to libraries used to program in other languages. To use a package, you give the package name to the &amp;lt;code&amp;gt;\usepackage&amp;lt;/code&amp;gt; command. A package that contains a lot of useful features for writing equations is the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 \usepackage{amsmath}  % include some useful tools for writing equations.&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
Notice that we used a Latex comment in this cases. Anything after a % is ignored and can be used to provide extra information that will not get put into the formatted document. In this case, we indicate why the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package is being included.&lt;br /&gt;
&lt;br /&gt;
====Inserting Math====&lt;br /&gt;
There are several different ways to display equations in a Latex document. Latex uses what it calls &amp;quot;math mode&amp;quot; to display equations. It does this because equations are formatted differently than normal text, so it is necessary to explicitly indicate equations. So, the many different ways of displaying equations are just different ways of entering math mode. There are many commands that only work in math mode (for example, the commands for Greek letters). Luckily, it is very simple to get into math mode. Here is a short list of the most common ways of displaying equations.&lt;br /&gt;
&lt;br /&gt;
;single dollar sign: $&lt;br /&gt;
:any text inside of a pair of dollar signs is formatted in math mode.&lt;br /&gt;
&lt;br /&gt;
;double dollar sign: $$&lt;br /&gt;
:text inside a pair of double dollar signs is formatted in math mode, but the equation is displayed centered on its own line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment will display an equation centered on its own line, like the $$, but it will also number it&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment can be used to format multi-line equations so that they align (for example, you may want the = sign in all of them to align). You must use a &amp;amp; to indicated where equations should be aligned, and a \\ to indicate the end of an equation line. If you don't want all lines to get numbered (which will happen by default) you can insert the &amp;lt;code&amp;gt;\nonumber&amp;lt;/code&amp;gt; command at the end of the line.&lt;br /&gt;
&lt;br /&gt;
Both the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environments have &amp;quot;starred&amp;quot; versions that will format equations without numbers. This is sometimes useful to display small, simple equations that will not be referenced later in the paper.&lt;br /&gt;
&lt;br /&gt;
One of the most powerful features of Latex is the ability to ''automatically'' number and reference equations. Rather than manually numbering each equation in your paper and then referring to those numbers directly in your papers text, Latex allows you to ''label'' your equation and then refer to that equation with the label. This has the advantage that you can then reorder your equations if needed, and the equation numbers will all be updated automatically. Here is a simple example document demonstrating the different methods for entering math mode.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \usepackage{amsmath}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 To insert equations, or math symbols, inline with the text, just use the dollar sign like this. Greek letter alpha is $\alpha$. This can be used in equations; $y = e^{\alpha t}$&lt;br /&gt;
 The double dollar signs will get you an equation on its own line $$y = mx + b$$, even if it is inline with the text.&lt;br /&gt;
 &lt;br /&gt;
 To number equations use the equation environment&lt;br /&gt;
 \begin{equation}&lt;br /&gt;
 \label{eq:quadradic}&lt;br /&gt;
 y = ax^2 + bx + c&lt;br /&gt;
 \end{equation}&lt;br /&gt;
 The equation above can now be referenced as Equation \ref{eq:quadradic}. Sometimes, we want multi-line equations.&lt;br /&gt;
 The align environment allows you to align you lines. Just use a &amp;amp; to indicate where they should be aligned,&lt;br /&gt;
 and a {\\} to indicate new lines. The \nonumber command will cause a specific line to not be numbered.&lt;br /&gt;
 \begin{align}&lt;br /&gt;
   Q(t) &amp;amp;= CV \nonumber \\&lt;br /&gt;
        &amp;amp;= C \left( \mathcal{E} - V_c \right) \\&lt;br /&gt;
   \frac{d Q}{dt} &amp;amp;=  \frac{d }{dt} \left(C\left( \mathcal{E} - V_c \right)\right) \\&lt;br /&gt;
                  &amp;amp;=  C\left( \frac{d \mathcal{E} }{dt} - \frac{d V_c}{dt} \right)&lt;br /&gt;
 \end{align}&lt;br /&gt;
 &lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Symbols=====&lt;br /&gt;
There are hundreds (probably thousands) of commands for writing equations. The Latex wikibook has a page on mathematics [http://en.wikibooks.org/wiki/LaTeX/Mathematics here]. A very dense&lt;br /&gt;
list of math symbols can be found [http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html here]. A downloadable pdf containing a dense list of symbols can be found [http://amath.colorado.edu/documentation/LaTeX/Symbols.pdf here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Formatting Papers, Reports, and Presentations===&lt;br /&gt;
There are numerous packages that assist in the formatting of journal articles to conform to specific requirements of professional societies and conferences.  Commonly of interest to those in Physics include:&lt;br /&gt;
&lt;br /&gt;
texlive-revtex and texlive-revtex4  --  Styles for various Physics Journals &lt;br /&gt;
&lt;br /&gt;
texlive-biblatex-phys               --  Styles for biblatex AIP and APS bibliographies&lt;br /&gt;
&lt;br /&gt;
texlive-spie                        --  Styles for formatting SPIE Proceedings manuscripts&lt;br /&gt;
&lt;br /&gt;
texlive-technics                    --  Styles for formatting technical documents&lt;br /&gt;
&lt;br /&gt;
texlive-IEEEtrans                   --  Styles for IEEE Transactions journals&lt;br /&gt;
&lt;br /&gt;
texlive-units, texlive-SIunits      --  Styles for typesetting units within documents&lt;br /&gt;
&lt;br /&gt;
texlive-preprint                    --  A bundle of useful stuff, notably the Author Affiliations Block&lt;br /&gt;
&lt;br /&gt;
texlive-authoraftertitle            --  Make Author Information available after maketitle command&lt;br /&gt;
&lt;br /&gt;
texlive-talk and texlive-beamer     --  Presentation formats&lt;br /&gt;
&lt;br /&gt;
texlive-lecturer  and texlive-powerdot  -- More presentation formats&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=620</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=620"/>
				<updated>2014-01-24T14:51:00Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Formatting Papers, Reports, and Presentations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Latex is a program for typesetting papers. It is very good at typesetting math, so it is commonly used in fields that require equations to be displayed in papers.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
To start writing Latex documents, you two things. A Latex ''compiler'' (this is a set of programs and files that allow you to generate pdfs from a Latex file), and a Latex ''editor'' (you can use a plain text editor, but an editor designed for Latex will have many more handy features). There are a few different Latex compilers and editors. The instructions below are to install the texlive compiler and texmaker editor.&lt;br /&gt;
;Windows&lt;br /&gt;
:#download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
:#configure texmaker: go to toolbar, choose options/quick build/User, add the following text&lt;br /&gt;
 latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps&lt;br /&gt;
&lt;br /&gt;
;Mac&lt;br /&gt;
:#Follow the instructions here http://www.tug.org/mactex/2011/&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
&lt;br /&gt;
;Ubuntu Linux&lt;br /&gt;
:use synaptic to install the texmaker which will automatically install texlive as well&lt;br /&gt;
 &amp;gt; sudo apt-get install texmaker&lt;br /&gt;
&lt;br /&gt;
You may also want to to install the REVTeX package (https://authors.aps.org/revtex4/). Many APS journals use a style included in this package. However, it is not necessary to do this before starting to use Latex.&lt;br /&gt;
For more information on installing custom document and bibliography styles, see http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html&lt;br /&gt;
&lt;br /&gt;
Here is a template that can be used for Advanced Lab: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)&lt;br /&gt;
&lt;br /&gt;
== Using LaTeX ==&lt;br /&gt;
===External References===&lt;br /&gt;
There are many, many different websites full of tutorials and references for Latex. Here are a couple of good ones.&lt;br /&gt;
&lt;br /&gt;
LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX&lt;br /&gt;
&lt;br /&gt;
LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html&lt;br /&gt;
&lt;br /&gt;
===Simple Tasks===&lt;br /&gt;
Latex is basically a language for &amp;quot;marking up&amp;quot; plain text to indicate how it should be formatted. The Latex compiler reads the marked up text and generate the output that is indicated. In Latex terminology, the user used '''commands''' to tell the Latex compiler what to do. Latex commands start with an '\'. For example, the latex command to create the Greek letter alpha (in math mode) is &amp;lt;code&amp;gt;\alpha&amp;lt;/code&amp;gt;. Some commands take arguments. These arguments are given to the command inside of curly brackets {}. For example, the Latex command to bold face some text is &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt;, and this command takes one argument, the text to bold face; &amp;lt;code&amp;gt;\textbf{make this bold}&amp;lt;/code&amp;gt;. Some commands take ''optional'' arguments. These arguments are given in square brakets [].&lt;br /&gt;
&lt;br /&gt;
A bare Latex document must declare the document class and have a document environment. These are specified with the &amp;lt;code&amp;gt;\documentclass&amp;lt;/code&amp;gt; command and a &amp;lt;code&amp;gt;\begin{document}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; commands.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
By default, Latex has a lot of useful features, but you will quickly find yourself needing to do something that is not possible with plain Latex. Latex allows you to use ''packages'' that have extra functionality. These packages are similar to libraries used to program in other languages. To use a package, you give the package name to the &amp;lt;code&amp;gt;\usepackage&amp;lt;/code&amp;gt; command. A package that contains a lot of useful features for writing equations is the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 \usepackage{amsmath}  % include some useful tools for writing equations.&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
Notice that we used a Latex comment in this cases. Anything after a % is ignored and can be used to provide extra information that will not get put into the formatted document. In this case, we indicate why the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package is being included.&lt;br /&gt;
&lt;br /&gt;
====Inserting Math====&lt;br /&gt;
There are several different ways to display equations in a Latex document. Latex uses what it calls &amp;quot;math mode&amp;quot; to display equations. It does this because equations are formatted differently than normal text, so it is necessary to explicitly indicate equations. So, the many different ways of displaying equations are just different ways of entering math mode. There are many commands that only work in math mode (for example, the commands for Greek letters). Luckily, it is very simple to get into math mode. Here is a short list of the most common ways of displaying equations.&lt;br /&gt;
&lt;br /&gt;
;single dollar sign: $&lt;br /&gt;
:any text inside of a pair of dollar signs is formatted in math mode.&lt;br /&gt;
&lt;br /&gt;
;double dollar sign: $$&lt;br /&gt;
:text inside a pair of double dollar signs is formatted in math mode, but the equation is displayed centered on its own line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment will display an equation centered on its own line, like the $$, but it will also number it&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment can be used to format multi-line equations so that they align (for example, you may want the = sign in all of them to align). You must use a &amp;amp; to indicated where equations should be aligned, and a \\ to indicate the end of an equation line. If you don't want all lines to get numbered (which will happen by default) you can insert the &amp;lt;code&amp;gt;\nonumber&amp;lt;/code&amp;gt; command at the end of the line.&lt;br /&gt;
&lt;br /&gt;
Both the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environments have &amp;quot;starred&amp;quot; versions that will format equations without numbers. This is sometimes useful to display small, simple equations that will not be referenced later in the paper.&lt;br /&gt;
&lt;br /&gt;
One of the most powerful features of Latex is the ability to ''automatically'' number and reference equations. Rather than manually numbering each equation in your paper and then referring to those numbers directly in your papers text, Latex allows you to ''label'' your equation and then refer to that equation with the label. This has the advantage that you can then reorder your equations if needed, and the equation numbers will all be updated automatically. Here is a simple example document demonstrating the different methods for entering math mode.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \usepackage{amsmath}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 To insert equations, or math symbols, inline with the text, just use the dollar sign like this. Greek letter alpha is $\alpha$. This can be used in equations; $y = e^{\alpha t}$&lt;br /&gt;
 The double dollar signs will get you an equation on its own line $$y = mx + b$$, even if it is inline with the text.&lt;br /&gt;
 &lt;br /&gt;
 To number equations use the equation environment&lt;br /&gt;
 \begin{equation}&lt;br /&gt;
 \label{eq:quadradic}&lt;br /&gt;
 y = ax^2 + bx + c&lt;br /&gt;
 \end{equation}&lt;br /&gt;
 The equation above can now be referenced as Equation \ref{eq:quadradic}. Sometimes, we want multi-line equations.&lt;br /&gt;
 The align environment allows you to align you lines. Just use a &amp;amp; to indicate where they should be aligned,&lt;br /&gt;
 and a {\\} to indicate new lines. The \nonumber command will cause a specific line to not be numbered.&lt;br /&gt;
 \begin{align}&lt;br /&gt;
   Q(t) &amp;amp;= CV \nonumber \\&lt;br /&gt;
        &amp;amp;= C \left( \mathcal{E} - V_c \right) \\&lt;br /&gt;
   \frac{d Q}{dt} &amp;amp;=  \frac{d }{dt} \left(C\left( \mathcal{E} - V_c \right)\right) \\&lt;br /&gt;
                  &amp;amp;=  C\left( \frac{d \mathcal{E} }{dt} - \frac{d V_c}{dt} \right)&lt;br /&gt;
 \end{align}&lt;br /&gt;
 &lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Symbols=====&lt;br /&gt;
There are hundreds (probably thousands) of commands for writing equations. The Latex wikibook has a page on mathematics [http://en.wikibooks.org/wiki/LaTeX/Mathematics here]. A very dense&lt;br /&gt;
list of math symbols can be found [http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html here]. A downloadable pdf containing a dense list of symbols can be found [http://amath.colorado.edu/documentation/LaTeX/Symbols.pdf here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Formatting Papers, Reports, and Presentations===&lt;br /&gt;
There are numerous packages that assist in the formatting of journal articles to conform to specific requirements of professional societies and conferences.  Commonly of interest to those in Physics include:&lt;br /&gt;
&lt;br /&gt;
texlive-revtex and texlive-revtex4  --  Styles for various Physics Journals &lt;br /&gt;
&lt;br /&gt;
texlive-biblatex-phys               --  Styles for biblatex AIP and APS bibliographies&lt;br /&gt;
&lt;br /&gt;
texlive-spie                        --  Styles for formatting SPIE Proceedings manuscripts&lt;br /&gt;
&lt;br /&gt;
texlive-technics                    --  Styles for formatting technical documents&lt;br /&gt;
&lt;br /&gt;
texlive-IEEEtrans                   --  Styles for IEEE Transactions journals&lt;br /&gt;
&lt;br /&gt;
texlive-units, texlive-SIunits      --  Styles for typesetting units within documents&lt;br /&gt;
&lt;br /&gt;
texlive-preprint                    --  A bundle of useful stuff, notably the Author Affiliations Block&lt;br /&gt;
&lt;br /&gt;
texlive-authoraftertitle            --  Make Author Information available after maketitle command&lt;br /&gt;
&lt;br /&gt;
texlive-talk and texlive-beamer     --  Presentation formats&lt;br /&gt;
&lt;br /&gt;
texlive-lecturer  and texlive-powerdot  -- More presentation formats&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=619</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=619"/>
				<updated>2014-01-24T14:36:14Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Packages of Interest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Latex is a program for typesetting papers. It is very good at typesetting math, so it is commonly used in fields that require equations to be displayed in papers.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
To start writing Latex documents, you two things. A Latex ''compiler'' (this is a set of programs and files that allow you to generate pdfs from a Latex file), and a Latex ''editor'' (you can use a plain text editor, but an editor designed for Latex will have many more handy features). There are a few different Latex compilers and editors. The instructions below are to install the texlive compiler and texmaker editor.&lt;br /&gt;
;Windows&lt;br /&gt;
:#download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
:#configure texmaker: go to toolbar, choose options/quick build/User, add the following text&lt;br /&gt;
 latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps&lt;br /&gt;
&lt;br /&gt;
;Mac&lt;br /&gt;
:#Follow the instructions here http://www.tug.org/mactex/2011/&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
&lt;br /&gt;
;Ubuntu Linux&lt;br /&gt;
:use synaptic to install the texmaker which will automatically install texlive as well&lt;br /&gt;
 &amp;gt; sudo apt-get install texmaker&lt;br /&gt;
&lt;br /&gt;
You may also want to to install the REVTeX package (https://authors.aps.org/revtex4/). Many APS journals use a style included in this package. However, it is not necessary to do this before starting to use Latex.&lt;br /&gt;
For more information on installing custom document and bibliography styles, see http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html&lt;br /&gt;
&lt;br /&gt;
Here is a template that can be used for Advanced Lab: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)&lt;br /&gt;
&lt;br /&gt;
== Using LaTeX ==&lt;br /&gt;
===External References===&lt;br /&gt;
There are many, many different websites full of tutorials and references for Latex. Here are a couple of good ones.&lt;br /&gt;
&lt;br /&gt;
LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX&lt;br /&gt;
&lt;br /&gt;
LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html&lt;br /&gt;
&lt;br /&gt;
===Simple Tasks===&lt;br /&gt;
Latex is basically a language for &amp;quot;marking up&amp;quot; plain text to indicate how it should be formatted. The Latex compiler reads the marked up text and generate the output that is indicated. In Latex terminology, the user used '''commands''' to tell the Latex compiler what to do. Latex commands start with an '\'. For example, the latex command to create the Greek letter alpha (in math mode) is &amp;lt;code&amp;gt;\alpha&amp;lt;/code&amp;gt;. Some commands take arguments. These arguments are given to the command inside of curly brackets {}. For example, the Latex command to bold face some text is &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt;, and this command takes one argument, the text to bold face; &amp;lt;code&amp;gt;\textbf{make this bold}&amp;lt;/code&amp;gt;. Some commands take ''optional'' arguments. These arguments are given in square brakets [].&lt;br /&gt;
&lt;br /&gt;
A bare Latex document must declare the document class and have a document environment. These are specified with the &amp;lt;code&amp;gt;\documentclass&amp;lt;/code&amp;gt; command and a &amp;lt;code&amp;gt;\begin{document}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; commands.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
By default, Latex has a lot of useful features, but you will quickly find yourself needing to do something that is not possible with plain Latex. Latex allows you to use ''packages'' that have extra functionality. These packages are similar to libraries used to program in other languages. To use a package, you give the package name to the &amp;lt;code&amp;gt;\usepackage&amp;lt;/code&amp;gt; command. A package that contains a lot of useful features for writing equations is the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 \usepackage{amsmath}  % include some useful tools for writing equations.&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
Notice that we used a Latex comment in this cases. Anything after a % is ignored and can be used to provide extra information that will not get put into the formatted document. In this case, we indicate why the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package is being included.&lt;br /&gt;
&lt;br /&gt;
====Inserting Math====&lt;br /&gt;
There are several different ways to display equations in a Latex document. Latex uses what it calls &amp;quot;math mode&amp;quot; to display equations. It does this because equations are formatted differently than normal text, so it is necessary to explicitly indicate equations. So, the many different ways of displaying equations are just different ways of entering math mode. There are many commands that only work in math mode (for example, the commands for Greek letters). Luckily, it is very simple to get into math mode. Here is a short list of the most common ways of displaying equations.&lt;br /&gt;
&lt;br /&gt;
;single dollar sign: $&lt;br /&gt;
:any text inside of a pair of dollar signs is formatted in math mode.&lt;br /&gt;
&lt;br /&gt;
;double dollar sign: $$&lt;br /&gt;
:text inside a pair of double dollar signs is formatted in math mode, but the equation is displayed centered on its own line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment will display an equation centered on its own line, like the $$, but it will also number it&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment can be used to format multi-line equations so that they align (for example, you may want the = sign in all of them to align). You must use a &amp;amp; to indicated where equations should be aligned, and a \\ to indicate the end of an equation line. If you don't want all lines to get numbered (which will happen by default) you can insert the &amp;lt;code&amp;gt;\nonumber&amp;lt;/code&amp;gt; command at the end of the line.&lt;br /&gt;
&lt;br /&gt;
Both the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environments have &amp;quot;starred&amp;quot; versions that will format equations without numbers. This is sometimes useful to display small, simple equations that will not be referenced later in the paper.&lt;br /&gt;
&lt;br /&gt;
One of the most powerful features of Latex is the ability to ''automatically'' number and reference equations. Rather than manually numbering each equation in your paper and then referring to those numbers directly in your papers text, Latex allows you to ''label'' your equation and then refer to that equation with the label. This has the advantage that you can then reorder your equations if needed, and the equation numbers will all be updated automatically. Here is a simple example document demonstrating the different methods for entering math mode.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \usepackage{amsmath}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 To insert equations, or math symbols, inline with the text, just use the dollar sign like this. Greek letter alpha is $\alpha$. This can be used in equations; $y = e^{\alpha t}$&lt;br /&gt;
 The double dollar signs will get you an equation on its own line $$y = mx + b$$, even if it is inline with the text.&lt;br /&gt;
 &lt;br /&gt;
 To number equations use the equation environment&lt;br /&gt;
 \begin{equation}&lt;br /&gt;
 \label{eq:quadradic}&lt;br /&gt;
 y = ax^2 + bx + c&lt;br /&gt;
 \end{equation}&lt;br /&gt;
 The equation above can now be referenced as Equation \ref{eq:quadradic}. Sometimes, we want multi-line equations.&lt;br /&gt;
 The align environment allows you to align you lines. Just use a &amp;amp; to indicate where they should be aligned,&lt;br /&gt;
 and a {\\} to indicate new lines. The \nonumber command will cause a specific line to not be numbered.&lt;br /&gt;
 \begin{align}&lt;br /&gt;
   Q(t) &amp;amp;= CV \nonumber \\&lt;br /&gt;
        &amp;amp;= C \left( \mathcal{E} - V_c \right) \\&lt;br /&gt;
   \frac{d Q}{dt} &amp;amp;=  \frac{d }{dt} \left(C\left( \mathcal{E} - V_c \right)\right) \\&lt;br /&gt;
                  &amp;amp;=  C\left( \frac{d \mathcal{E} }{dt} - \frac{d V_c}{dt} \right)&lt;br /&gt;
 \end{align}&lt;br /&gt;
 &lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Symbols=====&lt;br /&gt;
There are hundreds (probably thousands) of commands for writing equations. The Latex wikibook has a page on mathematics [http://en.wikibooks.org/wiki/LaTeX/Mathematics here]. A very dense&lt;br /&gt;
list of math symbols can be found [http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html here]. A downloadable pdf containing a dense list of symbols can be found [http://amath.colorado.edu/documentation/LaTeX/Symbols.pdf here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Formatting Papers, Reports, and Presentations===&lt;br /&gt;
There are numerous packages that assist in the formatting of journal articles to conform to specific requirements of professional societies and conferences.  Commonly of interest to those in Physics include:&lt;br /&gt;
&lt;br /&gt;
texlive-revtex and texlive-revtex4  --  Styles for various Physics Journals &lt;br /&gt;
&lt;br /&gt;
texlive-biblatex-phys               --  Styles for biblatex AIP and APS bibliographies&lt;br /&gt;
&lt;br /&gt;
texlive-spie                        --  Styles for formatting SPIE Proceedings manuscripts&lt;br /&gt;
&lt;br /&gt;
texlive-technics                    --  Styles for formatting technical documents&lt;br /&gt;
&lt;br /&gt;
texlive-IEEEtrans                   --  Styles for IEEE Transactions journals&lt;br /&gt;
&lt;br /&gt;
texlive-units, texlive-SIunits      --  Styles for typesetting units within documents&lt;br /&gt;
&lt;br /&gt;
texlive-authoraftertitle            --  Make Author Information available after maketitle command&lt;br /&gt;
&lt;br /&gt;
texlive-talk and texlive-beamer     --  Presentation formats&lt;br /&gt;
&lt;br /&gt;
texlive-lecturer  and texlive-powerdot  -- More presentation formats&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=618</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=618"/>
				<updated>2014-01-24T14:35:33Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Packages of Interest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Latex is a program for typesetting papers. It is very good at typesetting math, so it is commonly used in fields that require equations to be displayed in papers.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
To start writing Latex documents, you two things. A Latex ''compiler'' (this is a set of programs and files that allow you to generate pdfs from a Latex file), and a Latex ''editor'' (you can use a plain text editor, but an editor designed for Latex will have many more handy features). There are a few different Latex compilers and editors. The instructions below are to install the texlive compiler and texmaker editor.&lt;br /&gt;
;Windows&lt;br /&gt;
:#download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
:#configure texmaker: go to toolbar, choose options/quick build/User, add the following text&lt;br /&gt;
 latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps&lt;br /&gt;
&lt;br /&gt;
;Mac&lt;br /&gt;
:#Follow the instructions here http://www.tug.org/mactex/2011/&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
&lt;br /&gt;
;Ubuntu Linux&lt;br /&gt;
:use synaptic to install the texmaker which will automatically install texlive as well&lt;br /&gt;
 &amp;gt; sudo apt-get install texmaker&lt;br /&gt;
&lt;br /&gt;
You may also want to to install the REVTeX package (https://authors.aps.org/revtex4/). Many APS journals use a style included in this package. However, it is not necessary to do this before starting to use Latex.&lt;br /&gt;
For more information on installing custom document and bibliography styles, see http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html&lt;br /&gt;
&lt;br /&gt;
Here is a template that can be used for Advanced Lab: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)&lt;br /&gt;
&lt;br /&gt;
== Using LaTeX ==&lt;br /&gt;
===External References===&lt;br /&gt;
There are many, many different websites full of tutorials and references for Latex. Here are a couple of good ones.&lt;br /&gt;
&lt;br /&gt;
LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX&lt;br /&gt;
&lt;br /&gt;
LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html&lt;br /&gt;
&lt;br /&gt;
===Simple Tasks===&lt;br /&gt;
Latex is basically a language for &amp;quot;marking up&amp;quot; plain text to indicate how it should be formatted. The Latex compiler reads the marked up text and generate the output that is indicated. In Latex terminology, the user used '''commands''' to tell the Latex compiler what to do. Latex commands start with an '\'. For example, the latex command to create the Greek letter alpha (in math mode) is &amp;lt;code&amp;gt;\alpha&amp;lt;/code&amp;gt;. Some commands take arguments. These arguments are given to the command inside of curly brackets {}. For example, the Latex command to bold face some text is &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt;, and this command takes one argument, the text to bold face; &amp;lt;code&amp;gt;\textbf{make this bold}&amp;lt;/code&amp;gt;. Some commands take ''optional'' arguments. These arguments are given in square brakets [].&lt;br /&gt;
&lt;br /&gt;
A bare Latex document must declare the document class and have a document environment. These are specified with the &amp;lt;code&amp;gt;\documentclass&amp;lt;/code&amp;gt; command and a &amp;lt;code&amp;gt;\begin{document}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; commands.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
By default, Latex has a lot of useful features, but you will quickly find yourself needing to do something that is not possible with plain Latex. Latex allows you to use ''packages'' that have extra functionality. These packages are similar to libraries used to program in other languages. To use a package, you give the package name to the &amp;lt;code&amp;gt;\usepackage&amp;lt;/code&amp;gt; command. A package that contains a lot of useful features for writing equations is the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 \usepackage{amsmath}  % include some useful tools for writing equations.&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
Notice that we used a Latex comment in this cases. Anything after a % is ignored and can be used to provide extra information that will not get put into the formatted document. In this case, we indicate why the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package is being included.&lt;br /&gt;
&lt;br /&gt;
====Inserting Math====&lt;br /&gt;
There are several different ways to display equations in a Latex document. Latex uses what it calls &amp;quot;math mode&amp;quot; to display equations. It does this because equations are formatted differently than normal text, so it is necessary to explicitly indicate equations. So, the many different ways of displaying equations are just different ways of entering math mode. There are many commands that only work in math mode (for example, the commands for Greek letters). Luckily, it is very simple to get into math mode. Here is a short list of the most common ways of displaying equations.&lt;br /&gt;
&lt;br /&gt;
;single dollar sign: $&lt;br /&gt;
:any text inside of a pair of dollar signs is formatted in math mode.&lt;br /&gt;
&lt;br /&gt;
;double dollar sign: $$&lt;br /&gt;
:text inside a pair of double dollar signs is formatted in math mode, but the equation is displayed centered on its own line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment will display an equation centered on its own line, like the $$, but it will also number it&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment can be used to format multi-line equations so that they align (for example, you may want the = sign in all of them to align). You must use a &amp;amp; to indicated where equations should be aligned, and a \\ to indicate the end of an equation line. If you don't want all lines to get numbered (which will happen by default) you can insert the &amp;lt;code&amp;gt;\nonumber&amp;lt;/code&amp;gt; command at the end of the line.&lt;br /&gt;
&lt;br /&gt;
Both the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environments have &amp;quot;starred&amp;quot; versions that will format equations without numbers. This is sometimes useful to display small, simple equations that will not be referenced later in the paper.&lt;br /&gt;
&lt;br /&gt;
One of the most powerful features of Latex is the ability to ''automatically'' number and reference equations. Rather than manually numbering each equation in your paper and then referring to those numbers directly in your papers text, Latex allows you to ''label'' your equation and then refer to that equation with the label. This has the advantage that you can then reorder your equations if needed, and the equation numbers will all be updated automatically. Here is a simple example document demonstrating the different methods for entering math mode.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \usepackage{amsmath}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 To insert equations, or math symbols, inline with the text, just use the dollar sign like this. Greek letter alpha is $\alpha$. This can be used in equations; $y = e^{\alpha t}$&lt;br /&gt;
 The double dollar signs will get you an equation on its own line $$y = mx + b$$, even if it is inline with the text.&lt;br /&gt;
 &lt;br /&gt;
 To number equations use the equation environment&lt;br /&gt;
 \begin{equation}&lt;br /&gt;
 \label{eq:quadradic}&lt;br /&gt;
 y = ax^2 + bx + c&lt;br /&gt;
 \end{equation}&lt;br /&gt;
 The equation above can now be referenced as Equation \ref{eq:quadradic}. Sometimes, we want multi-line equations.&lt;br /&gt;
 The align environment allows you to align you lines. Just use a &amp;amp; to indicate where they should be aligned,&lt;br /&gt;
 and a {\\} to indicate new lines. The \nonumber command will cause a specific line to not be numbered.&lt;br /&gt;
 \begin{align}&lt;br /&gt;
   Q(t) &amp;amp;= CV \nonumber \\&lt;br /&gt;
        &amp;amp;= C \left( \mathcal{E} - V_c \right) \\&lt;br /&gt;
   \frac{d Q}{dt} &amp;amp;=  \frac{d }{dt} \left(C\left( \mathcal{E} - V_c \right)\right) \\&lt;br /&gt;
                  &amp;amp;=  C\left( \frac{d \mathcal{E} }{dt} - \frac{d V_c}{dt} \right)&lt;br /&gt;
 \end{align}&lt;br /&gt;
 &lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Symbols=====&lt;br /&gt;
There are hundreds (probably thousands) of commands for writing equations. The Latex wikibook has a page on mathematics [http://en.wikibooks.org/wiki/LaTeX/Mathematics here]. A very dense&lt;br /&gt;
list of math symbols can be found [http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html here]. A downloadable pdf containing a dense list of symbols can be found [http://amath.colorado.edu/documentation/LaTeX/Symbols.pdf here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Packages of Interest====&lt;br /&gt;
There are numerous packages that assist in the formatting of journal articles to conform to specific requirements of professional societies and conferences.  Commonly of interest to those in Physics include:&lt;br /&gt;
&lt;br /&gt;
texlive-revtex and texlive-revtex4  --  Styles for various Physics Journals &lt;br /&gt;
&lt;br /&gt;
texlive-biblatex-phys               --  Styles for biblatex AIP and APS bibliographies&lt;br /&gt;
&lt;br /&gt;
texlive-spie                        --  Styles for formatting SPIE Proceedings manuscripts&lt;br /&gt;
&lt;br /&gt;
texlive-technics                    --  Styles for formatting technical documents&lt;br /&gt;
&lt;br /&gt;
texlive-IEEEtrans                   --  Styles for IEEE Transactions journals&lt;br /&gt;
&lt;br /&gt;
texlive-units, texlive-SIunits      --  Styles for typesetting units within documents&lt;br /&gt;
&lt;br /&gt;
texlive-authoraftertitle            --  Make Author Information available after maketitle command&lt;br /&gt;
&lt;br /&gt;
texlive-talk and texlive-beamer     --  Presentation formats&lt;br /&gt;
&lt;br /&gt;
texlive-lecturer  and texlive-powerdot  -- More presentation formats&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=617</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=617"/>
				<updated>2014-01-24T14:15:41Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Packages of Interest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Latex is a program for typesetting papers. It is very good at typesetting math, so it is commonly used in fields that require equations to be displayed in papers.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
To start writing Latex documents, you two things. A Latex ''compiler'' (this is a set of programs and files that allow you to generate pdfs from a Latex file), and a Latex ''editor'' (you can use a plain text editor, but an editor designed for Latex will have many more handy features). There are a few different Latex compilers and editors. The instructions below are to install the texlive compiler and texmaker editor.&lt;br /&gt;
;Windows&lt;br /&gt;
:#download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
:#configure texmaker: go to toolbar, choose options/quick build/User, add the following text&lt;br /&gt;
 latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps&lt;br /&gt;
&lt;br /&gt;
;Mac&lt;br /&gt;
:#Follow the instructions here http://www.tug.org/mactex/2011/&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
&lt;br /&gt;
;Ubuntu Linux&lt;br /&gt;
:use synaptic to install the texmaker which will automatically install texlive as well&lt;br /&gt;
 &amp;gt; sudo apt-get install texmaker&lt;br /&gt;
&lt;br /&gt;
You may also want to to install the REVTeX package (https://authors.aps.org/revtex4/). Many APS journals use a style included in this package. However, it is not necessary to do this before starting to use Latex.&lt;br /&gt;
For more information on installing custom document and bibliography styles, see http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html&lt;br /&gt;
&lt;br /&gt;
Here is a template that can be used for Advanced Lab: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)&lt;br /&gt;
&lt;br /&gt;
== Using LaTeX ==&lt;br /&gt;
===External References===&lt;br /&gt;
There are many, many different websites full of tutorials and references for Latex. Here are a couple of good ones.&lt;br /&gt;
&lt;br /&gt;
LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX&lt;br /&gt;
&lt;br /&gt;
LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html&lt;br /&gt;
&lt;br /&gt;
===Simple Tasks===&lt;br /&gt;
Latex is basically a language for &amp;quot;marking up&amp;quot; plain text to indicate how it should be formatted. The Latex compiler reads the marked up text and generate the output that is indicated. In Latex terminology, the user used '''commands''' to tell the Latex compiler what to do. Latex commands start with an '\'. For example, the latex command to create the Greek letter alpha (in math mode) is &amp;lt;code&amp;gt;\alpha&amp;lt;/code&amp;gt;. Some commands take arguments. These arguments are given to the command inside of curly brackets {}. For example, the Latex command to bold face some text is &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt;, and this command takes one argument, the text to bold face; &amp;lt;code&amp;gt;\textbf{make this bold}&amp;lt;/code&amp;gt;. Some commands take ''optional'' arguments. These arguments are given in square brakets [].&lt;br /&gt;
&lt;br /&gt;
A bare Latex document must declare the document class and have a document environment. These are specified with the &amp;lt;code&amp;gt;\documentclass&amp;lt;/code&amp;gt; command and a &amp;lt;code&amp;gt;\begin{document}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; commands.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
By default, Latex has a lot of useful features, but you will quickly find yourself needing to do something that is not possible with plain Latex. Latex allows you to use ''packages'' that have extra functionality. These packages are similar to libraries used to program in other languages. To use a package, you give the package name to the &amp;lt;code&amp;gt;\usepackage&amp;lt;/code&amp;gt; command. A package that contains a lot of useful features for writing equations is the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 \usepackage{amsmath}  % include some useful tools for writing equations.&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
Notice that we used a Latex comment in this cases. Anything after a % is ignored and can be used to provide extra information that will not get put into the formatted document. In this case, we indicate why the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package is being included.&lt;br /&gt;
&lt;br /&gt;
====Inserting Math====&lt;br /&gt;
There are several different ways to display equations in a Latex document. Latex uses what it calls &amp;quot;math mode&amp;quot; to display equations. It does this because equations are formatted differently than normal text, so it is necessary to explicitly indicate equations. So, the many different ways of displaying equations are just different ways of entering math mode. There are many commands that only work in math mode (for example, the commands for Greek letters). Luckily, it is very simple to get into math mode. Here is a short list of the most common ways of displaying equations.&lt;br /&gt;
&lt;br /&gt;
;single dollar sign: $&lt;br /&gt;
:any text inside of a pair of dollar signs is formatted in math mode.&lt;br /&gt;
&lt;br /&gt;
;double dollar sign: $$&lt;br /&gt;
:text inside a pair of double dollar signs is formatted in math mode, but the equation is displayed centered on its own line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment will display an equation centered on its own line, like the $$, but it will also number it&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment can be used to format multi-line equations so that they align (for example, you may want the = sign in all of them to align). You must use a &amp;amp; to indicated where equations should be aligned, and a \\ to indicate the end of an equation line. If you don't want all lines to get numbered (which will happen by default) you can insert the &amp;lt;code&amp;gt;\nonumber&amp;lt;/code&amp;gt; command at the end of the line.&lt;br /&gt;
&lt;br /&gt;
Both the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environments have &amp;quot;starred&amp;quot; versions that will format equations without numbers. This is sometimes useful to display small, simple equations that will not be referenced later in the paper.&lt;br /&gt;
&lt;br /&gt;
One of the most powerful features of Latex is the ability to ''automatically'' number and reference equations. Rather than manually numbering each equation in your paper and then referring to those numbers directly in your papers text, Latex allows you to ''label'' your equation and then refer to that equation with the label. This has the advantage that you can then reorder your equations if needed, and the equation numbers will all be updated automatically. Here is a simple example document demonstrating the different methods for entering math mode.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \usepackage{amsmath}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 To insert equations, or math symbols, inline with the text, just use the dollar sign like this. Greek letter alpha is $\alpha$. This can be used in equations; $y = e^{\alpha t}$&lt;br /&gt;
 The double dollar signs will get you an equation on its own line $$y = mx + b$$, even if it is inline with the text.&lt;br /&gt;
 &lt;br /&gt;
 To number equations use the equation environment&lt;br /&gt;
 \begin{equation}&lt;br /&gt;
 \label{eq:quadradic}&lt;br /&gt;
 y = ax^2 + bx + c&lt;br /&gt;
 \end{equation}&lt;br /&gt;
 The equation above can now be referenced as Equation \ref{eq:quadradic}. Sometimes, we want multi-line equations.&lt;br /&gt;
 The align environment allows you to align you lines. Just use a &amp;amp; to indicate where they should be aligned,&lt;br /&gt;
 and a {\\} to indicate new lines. The \nonumber command will cause a specific line to not be numbered.&lt;br /&gt;
 \begin{align}&lt;br /&gt;
   Q(t) &amp;amp;= CV \nonumber \\&lt;br /&gt;
        &amp;amp;= C \left( \mathcal{E} - V_c \right) \\&lt;br /&gt;
   \frac{d Q}{dt} &amp;amp;=  \frac{d }{dt} \left(C\left( \mathcal{E} - V_c \right)\right) \\&lt;br /&gt;
                  &amp;amp;=  C\left( \frac{d \mathcal{E} }{dt} - \frac{d V_c}{dt} \right)&lt;br /&gt;
 \end{align}&lt;br /&gt;
 &lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Symbols=====&lt;br /&gt;
There are hundreds (probably thousands) of commands for writing equations. The Latex wikibook has a page on mathematics [http://en.wikibooks.org/wiki/LaTeX/Mathematics here]. A very dense&lt;br /&gt;
list of math symbols can be found [http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html here]. A downloadable pdf containing a dense list of symbols can be found [http://amath.colorado.edu/documentation/LaTeX/Symbols.pdf here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Packages of Interest====&lt;br /&gt;
There are numerous packages that assist in the formatting of journal articles to conform to specific requirements of professional societies and conferences.  Commonly of interest to those in Physics include:&lt;br /&gt;
&lt;br /&gt;
texlive-revtex and texlive-revtex4  --  Styles for various Physics Journals &lt;br /&gt;
&lt;br /&gt;
texlive-biblatex-phys               --  Styles for biblatex AIP and APS bibliographies&lt;br /&gt;
&lt;br /&gt;
texlive-spie                        --  Styles for formatting SPIE Proceedings manuscripts&lt;br /&gt;
&lt;br /&gt;
texlive-technics                    --  Styles for formatting technical documents&lt;br /&gt;
&lt;br /&gt;
texlive-IEEEtrans                   --  Styles for IEEE Transactions journals&lt;br /&gt;
&lt;br /&gt;
texlive-units, texlive-SIunits      --  Styles for typesetting units within documents&lt;br /&gt;
&lt;br /&gt;
texlive-authoraftertitle            --  Make Author Information available after maketitle command&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=616</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=616"/>
				<updated>2014-01-24T14:15:14Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Packages of Interest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Latex is a program for typesetting papers. It is very good at typesetting math, so it is commonly used in fields that require equations to be displayed in papers.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
To start writing Latex documents, you two things. A Latex ''compiler'' (this is a set of programs and files that allow you to generate pdfs from a Latex file), and a Latex ''editor'' (you can use a plain text editor, but an editor designed for Latex will have many more handy features). There are a few different Latex compilers and editors. The instructions below are to install the texlive compiler and texmaker editor.&lt;br /&gt;
;Windows&lt;br /&gt;
:#download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
:#configure texmaker: go to toolbar, choose options/quick build/User, add the following text&lt;br /&gt;
 latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps&lt;br /&gt;
&lt;br /&gt;
;Mac&lt;br /&gt;
:#Follow the instructions here http://www.tug.org/mactex/2011/&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
&lt;br /&gt;
;Ubuntu Linux&lt;br /&gt;
:use synaptic to install the texmaker which will automatically install texlive as well&lt;br /&gt;
 &amp;gt; sudo apt-get install texmaker&lt;br /&gt;
&lt;br /&gt;
You may also want to to install the REVTeX package (https://authors.aps.org/revtex4/). Many APS journals use a style included in this package. However, it is not necessary to do this before starting to use Latex.&lt;br /&gt;
For more information on installing custom document and bibliography styles, see http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html&lt;br /&gt;
&lt;br /&gt;
Here is a template that can be used for Advanced Lab: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)&lt;br /&gt;
&lt;br /&gt;
== Using LaTeX ==&lt;br /&gt;
===External References===&lt;br /&gt;
There are many, many different websites full of tutorials and references for Latex. Here are a couple of good ones.&lt;br /&gt;
&lt;br /&gt;
LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX&lt;br /&gt;
&lt;br /&gt;
LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html&lt;br /&gt;
&lt;br /&gt;
===Simple Tasks===&lt;br /&gt;
Latex is basically a language for &amp;quot;marking up&amp;quot; plain text to indicate how it should be formatted. The Latex compiler reads the marked up text and generate the output that is indicated. In Latex terminology, the user used '''commands''' to tell the Latex compiler what to do. Latex commands start with an '\'. For example, the latex command to create the Greek letter alpha (in math mode) is &amp;lt;code&amp;gt;\alpha&amp;lt;/code&amp;gt;. Some commands take arguments. These arguments are given to the command inside of curly brackets {}. For example, the Latex command to bold face some text is &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt;, and this command takes one argument, the text to bold face; &amp;lt;code&amp;gt;\textbf{make this bold}&amp;lt;/code&amp;gt;. Some commands take ''optional'' arguments. These arguments are given in square brakets [].&lt;br /&gt;
&lt;br /&gt;
A bare Latex document must declare the document class and have a document environment. These are specified with the &amp;lt;code&amp;gt;\documentclass&amp;lt;/code&amp;gt; command and a &amp;lt;code&amp;gt;\begin{document}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; commands.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
By default, Latex has a lot of useful features, but you will quickly find yourself needing to do something that is not possible with plain Latex. Latex allows you to use ''packages'' that have extra functionality. These packages are similar to libraries used to program in other languages. To use a package, you give the package name to the &amp;lt;code&amp;gt;\usepackage&amp;lt;/code&amp;gt; command. A package that contains a lot of useful features for writing equations is the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 \usepackage{amsmath}  % include some useful tools for writing equations.&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
Notice that we used a Latex comment in this cases. Anything after a % is ignored and can be used to provide extra information that will not get put into the formatted document. In this case, we indicate why the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package is being included.&lt;br /&gt;
&lt;br /&gt;
====Inserting Math====&lt;br /&gt;
There are several different ways to display equations in a Latex document. Latex uses what it calls &amp;quot;math mode&amp;quot; to display equations. It does this because equations are formatted differently than normal text, so it is necessary to explicitly indicate equations. So, the many different ways of displaying equations are just different ways of entering math mode. There are many commands that only work in math mode (for example, the commands for Greek letters). Luckily, it is very simple to get into math mode. Here is a short list of the most common ways of displaying equations.&lt;br /&gt;
&lt;br /&gt;
;single dollar sign: $&lt;br /&gt;
:any text inside of a pair of dollar signs is formatted in math mode.&lt;br /&gt;
&lt;br /&gt;
;double dollar sign: $$&lt;br /&gt;
:text inside a pair of double dollar signs is formatted in math mode, but the equation is displayed centered on its own line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment will display an equation centered on its own line, like the $$, but it will also number it&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment can be used to format multi-line equations so that they align (for example, you may want the = sign in all of them to align). You must use a &amp;amp; to indicated where equations should be aligned, and a \\ to indicate the end of an equation line. If you don't want all lines to get numbered (which will happen by default) you can insert the &amp;lt;code&amp;gt;\nonumber&amp;lt;/code&amp;gt; command at the end of the line.&lt;br /&gt;
&lt;br /&gt;
Both the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environments have &amp;quot;starred&amp;quot; versions that will format equations without numbers. This is sometimes useful to display small, simple equations that will not be referenced later in the paper.&lt;br /&gt;
&lt;br /&gt;
One of the most powerful features of Latex is the ability to ''automatically'' number and reference equations. Rather than manually numbering each equation in your paper and then referring to those numbers directly in your papers text, Latex allows you to ''label'' your equation and then refer to that equation with the label. This has the advantage that you can then reorder your equations if needed, and the equation numbers will all be updated automatically. Here is a simple example document demonstrating the different methods for entering math mode.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \usepackage{amsmath}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 To insert equations, or math symbols, inline with the text, just use the dollar sign like this. Greek letter alpha is $\alpha$. This can be used in equations; $y = e^{\alpha t}$&lt;br /&gt;
 The double dollar signs will get you an equation on its own line $$y = mx + b$$, even if it is inline with the text.&lt;br /&gt;
 &lt;br /&gt;
 To number equations use the equation environment&lt;br /&gt;
 \begin{equation}&lt;br /&gt;
 \label{eq:quadradic}&lt;br /&gt;
 y = ax^2 + bx + c&lt;br /&gt;
 \end{equation}&lt;br /&gt;
 The equation above can now be referenced as Equation \ref{eq:quadradic}. Sometimes, we want multi-line equations.&lt;br /&gt;
 The align environment allows you to align you lines. Just use a &amp;amp; to indicate where they should be aligned,&lt;br /&gt;
 and a {\\} to indicate new lines. The \nonumber command will cause a specific line to not be numbered.&lt;br /&gt;
 \begin{align}&lt;br /&gt;
   Q(t) &amp;amp;= CV \nonumber \\&lt;br /&gt;
        &amp;amp;= C \left( \mathcal{E} - V_c \right) \\&lt;br /&gt;
   \frac{d Q}{dt} &amp;amp;=  \frac{d }{dt} \left(C\left( \mathcal{E} - V_c \right)\right) \\&lt;br /&gt;
                  &amp;amp;=  C\left( \frac{d \mathcal{E} }{dt} - \frac{d V_c}{dt} \right)&lt;br /&gt;
 \end{align}&lt;br /&gt;
 &lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Symbols=====&lt;br /&gt;
There are hundreds (probably thousands) of commands for writing equations. The Latex wikibook has a page on mathematics [http://en.wikibooks.org/wiki/LaTeX/Mathematics here]. A very dense&lt;br /&gt;
list of math symbols can be found [http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html here]. A downloadable pdf containing a dense list of symbols can be found [http://amath.colorado.edu/documentation/LaTeX/Symbols.pdf here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Packages of Interest====&lt;br /&gt;
There are numerous packages that assist in the formatting of journal articles to conform to specific requirements of professional societies and conferences.  Commonly of interest to those in Physics include:&lt;br /&gt;
&lt;br /&gt;
texlive-revtex and texlive-revtex4  --  Styles for various Physics Journals &lt;br /&gt;
texlive-biblatex-phys               --  Styles for biblatex AIP and APS bibliographies&lt;br /&gt;
texlive-spie                        --  Styles for formatting SPIE Proceedings manuscripts&lt;br /&gt;
texlive-technics                    --  Styles for formatting technical documents&lt;br /&gt;
texlive-IEEEtrans                   --  Styles for IEEE Transactions journals&lt;br /&gt;
texlive-units, texlive-SIunits      --  Styles for typesetting units within documents&lt;br /&gt;
texlive-authoraftertitle            --  Make Author Information available after maketitle command&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=615</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=615"/>
				<updated>2014-01-24T14:14:50Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Latex is a program for typesetting papers. It is very good at typesetting math, so it is commonly used in fields that require equations to be displayed in papers.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
To start writing Latex documents, you two things. A Latex ''compiler'' (this is a set of programs and files that allow you to generate pdfs from a Latex file), and a Latex ''editor'' (you can use a plain text editor, but an editor designed for Latex will have many more handy features). There are a few different Latex compilers and editors. The instructions below are to install the texlive compiler and texmaker editor.&lt;br /&gt;
;Windows&lt;br /&gt;
:#download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
:#configure texmaker: go to toolbar, choose options/quick build/User, add the following text&lt;br /&gt;
 latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps&lt;br /&gt;
&lt;br /&gt;
;Mac&lt;br /&gt;
:#Follow the instructions here http://www.tug.org/mactex/2011/&lt;br /&gt;
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/&lt;br /&gt;
&lt;br /&gt;
;Ubuntu Linux&lt;br /&gt;
:use synaptic to install the texmaker which will automatically install texlive as well&lt;br /&gt;
 &amp;gt; sudo apt-get install texmaker&lt;br /&gt;
&lt;br /&gt;
You may also want to to install the REVTeX package (https://authors.aps.org/revtex4/). Many APS journals use a style included in this package. However, it is not necessary to do this before starting to use Latex.&lt;br /&gt;
For more information on installing custom document and bibliography styles, see http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html&lt;br /&gt;
&lt;br /&gt;
Here is a template that can be used for Advanced Lab: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)&lt;br /&gt;
&lt;br /&gt;
== Using LaTeX ==&lt;br /&gt;
===External References===&lt;br /&gt;
There are many, many different websites full of tutorials and references for Latex. Here are a couple of good ones.&lt;br /&gt;
&lt;br /&gt;
LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX&lt;br /&gt;
&lt;br /&gt;
LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html&lt;br /&gt;
&lt;br /&gt;
===Simple Tasks===&lt;br /&gt;
Latex is basically a language for &amp;quot;marking up&amp;quot; plain text to indicate how it should be formatted. The Latex compiler reads the marked up text and generate the output that is indicated. In Latex terminology, the user used '''commands''' to tell the Latex compiler what to do. Latex commands start with an '\'. For example, the latex command to create the Greek letter alpha (in math mode) is &amp;lt;code&amp;gt;\alpha&amp;lt;/code&amp;gt;. Some commands take arguments. These arguments are given to the command inside of curly brackets {}. For example, the Latex command to bold face some text is &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt;, and this command takes one argument, the text to bold face; &amp;lt;code&amp;gt;\textbf{make this bold}&amp;lt;/code&amp;gt;. Some commands take ''optional'' arguments. These arguments are given in square brakets [].&lt;br /&gt;
&lt;br /&gt;
A bare Latex document must declare the document class and have a document environment. These are specified with the &amp;lt;code&amp;gt;\documentclass&amp;lt;/code&amp;gt; command and a &amp;lt;code&amp;gt;\begin{document}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; commands.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
By default, Latex has a lot of useful features, but you will quickly find yourself needing to do something that is not possible with plain Latex. Latex allows you to use ''packages'' that have extra functionality. These packages are similar to libraries used to program in other languages. To use a package, you give the package name to the &amp;lt;code&amp;gt;\usepackage&amp;lt;/code&amp;gt; command. A package that contains a lot of useful features for writing equations is the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 \usepackage{amsmath}  % include some useful tools for writing equations.&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 This is the simplest document I could think of.&lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
Notice that we used a Latex comment in this cases. Anything after a % is ignored and can be used to provide extra information that will not get put into the formatted document. In this case, we indicate why the &amp;lt;code&amp;gt;amsmath&amp;lt;/code&amp;gt; package is being included.&lt;br /&gt;
&lt;br /&gt;
====Inserting Math====&lt;br /&gt;
There are several different ways to display equations in a Latex document. Latex uses what it calls &amp;quot;math mode&amp;quot; to display equations. It does this because equations are formatted differently than normal text, so it is necessary to explicitly indicate equations. So, the many different ways of displaying equations are just different ways of entering math mode. There are many commands that only work in math mode (for example, the commands for Greek letters). Luckily, it is very simple to get into math mode. Here is a short list of the most common ways of displaying equations.&lt;br /&gt;
&lt;br /&gt;
;single dollar sign: $&lt;br /&gt;
:any text inside of a pair of dollar signs is formatted in math mode.&lt;br /&gt;
&lt;br /&gt;
;double dollar sign: $$&lt;br /&gt;
:text inside a pair of double dollar signs is formatted in math mode, but the equation is displayed centered on its own line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; environment will display an equation centered on its own line, like the $$, but it will also number it&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment&lt;br /&gt;
:the &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environment can be used to format multi-line equations so that they align (for example, you may want the = sign in all of them to align). You must use a &amp;amp; to indicated where equations should be aligned, and a \\ to indicate the end of an equation line. If you don't want all lines to get numbered (which will happen by default) you can insert the &amp;lt;code&amp;gt;\nonumber&amp;lt;/code&amp;gt; command at the end of the line.&lt;br /&gt;
&lt;br /&gt;
Both the &amp;lt;code&amp;gt;equation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; environments have &amp;quot;starred&amp;quot; versions that will format equations without numbers. This is sometimes useful to display small, simple equations that will not be referenced later in the paper.&lt;br /&gt;
&lt;br /&gt;
One of the most powerful features of Latex is the ability to ''automatically'' number and reference equations. Rather than manually numbering each equation in your paper and then referring to those numbers directly in your papers text, Latex allows you to ''label'' your equation and then refer to that equation with the label. This has the advantage that you can then reorder your equations if needed, and the equation numbers will all be updated automatically. Here is a simple example document demonstrating the different methods for entering math mode.&lt;br /&gt;
&lt;br /&gt;
 \documentclass{article}&lt;br /&gt;
 &lt;br /&gt;
 \usepackage{amsmath}&lt;br /&gt;
 &lt;br /&gt;
 \begin{document}&lt;br /&gt;
 To insert equations, or math symbols, inline with the text, just use the dollar sign like this. Greek letter alpha is $\alpha$. This can be used in equations; $y = e^{\alpha t}$&lt;br /&gt;
 The double dollar signs will get you an equation on its own line $$y = mx + b$$, even if it is inline with the text.&lt;br /&gt;
 &lt;br /&gt;
 To number equations use the equation environment&lt;br /&gt;
 \begin{equation}&lt;br /&gt;
 \label{eq:quadradic}&lt;br /&gt;
 y = ax^2 + bx + c&lt;br /&gt;
 \end{equation}&lt;br /&gt;
 The equation above can now be referenced as Equation \ref{eq:quadradic}. Sometimes, we want multi-line equations.&lt;br /&gt;
 The align environment allows you to align you lines. Just use a &amp;amp; to indicate where they should be aligned,&lt;br /&gt;
 and a {\\} to indicate new lines. The \nonumber command will cause a specific line to not be numbered.&lt;br /&gt;
 \begin{align}&lt;br /&gt;
   Q(t) &amp;amp;= CV \nonumber \\&lt;br /&gt;
        &amp;amp;= C \left( \mathcal{E} - V_c \right) \\&lt;br /&gt;
   \frac{d Q}{dt} &amp;amp;=  \frac{d }{dt} \left(C\left( \mathcal{E} - V_c \right)\right) \\&lt;br /&gt;
                  &amp;amp;=  C\left( \frac{d \mathcal{E} }{dt} - \frac{d V_c}{dt} \right)&lt;br /&gt;
 \end{align}&lt;br /&gt;
 &lt;br /&gt;
 \end{document}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Symbols=====&lt;br /&gt;
There are hundreds (probably thousands) of commands for writing equations. The Latex wikibook has a page on mathematics [http://en.wikibooks.org/wiki/LaTeX/Mathematics here]. A very dense&lt;br /&gt;
list of math symbols can be found [http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html here]. A downloadable pdf containing a dense list of symbols can be found [http://amath.colorado.edu/documentation/LaTeX/Symbols.pdf here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Packages of Interest====&lt;br /&gt;
There are numerous packages that assist in the formatting of journal articles to conform to specific requirements of professional societies and conferences.  Commonly of interest to those in Physics include:&lt;br /&gt;
&lt;br /&gt;
texlive-revtex and texlive-revtex4  --  Styles for various Physics Journals&lt;br /&gt;
texlive-biblatex-phys               --  Styles for biblatex AIP and APS bibliographies&lt;br /&gt;
texlive-spie                        --  Styles for formatting SPIE Proceedings manuscripts&lt;br /&gt;
texlive-technics                    --  Styles for formatting technical documents&lt;br /&gt;
texlive-IEEEtrans                   --  Styles for IEEE Transactions journals&lt;br /&gt;
texlive-units, texlive-SIunits      --  Styles for typesetting units within documents&lt;br /&gt;
texlive-authoraftertitle            --  Make Author Information available after maketitle command&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=607</id>
		<title>Computational Physics Links</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=607"/>
				<updated>2013-07-01T13:41:59Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Computational Physics at U. of Buffalo [http://www.physics.buffalo.edu/phy410-505/index.html]&lt;br /&gt;
&lt;br /&gt;
Computational Physics at Old Dominion U. [http://ww2.odu.edu/~agodunov/teaching/notes/]&lt;br /&gt;
&lt;br /&gt;
Computational Physics at U. of Texas - Austin (includes git repository of source) [http://farside.ph.utexas.edu/teaching/329/329.html]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=606</id>
		<title>Computational Physics Links</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=606"/>
				<updated>2013-07-01T13:41:24Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Computational Physics at U. of Buffalo [http://www.physics.buffalo.edu/phy410-505/index.html]&lt;br /&gt;
&lt;br /&gt;
Computational Physics at Old Dominion U. [http://ww2.odu.edu/~agodunov/teaching/notes/]&lt;br /&gt;
&lt;br /&gt;
Computational Physics at U. of Texas - Austin [http://farside.ph.utexas.edu/teaching/329/329.html]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=605</id>
		<title>Computational Physics Links</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=605"/>
				<updated>2013-07-01T13:38:03Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Computational Physics at U. of Buffalo [http://www.physics.buffalo.edu/phy410-505/index.html]&lt;br /&gt;
&lt;br /&gt;
Computational Physics at Old Dominion U. [http://ww2.odu.edu/~agodunov/teaching/notes/]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=604</id>
		<title>Computational Physics Links</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Computational_Physics_Links&amp;diff=604"/>
				<updated>2013-07-01T13:36:07Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: Links to Computational Physics Lectures and Examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Computational Physics at U. of Buffalo [http://www.physics.buffalo.edu/phy410-505/index.html]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Main_Page&amp;diff=603</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Main_Page&amp;diff=603"/>
				<updated>2013-07-01T13:35:07Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Welcome to the FHSU Physics Department Wiki!'''&lt;br /&gt;
&lt;br /&gt;
==Main Topics==&lt;br /&gt;
&lt;br /&gt;
===Modeling &amp;amp; Simulation===&lt;br /&gt;
==== Codes ====&lt;br /&gt;
[[BTEC]]&lt;br /&gt;
&lt;br /&gt;
[[Schrodinger]]&lt;br /&gt;
&lt;br /&gt;
====Tools====&lt;br /&gt;
[[Linux]]&lt;br /&gt;
&lt;br /&gt;
[[HPC - High Performance Computing]]&lt;br /&gt;
&lt;br /&gt;
[[Computational Physics Links]]&lt;br /&gt;
&lt;br /&gt;
===Doing Science===&lt;br /&gt;
There are many tools available that make our jobs as scientists easier. Here is a collection of software, analysis techniques, and more, that you may find useful.&lt;br /&gt;
* [[Linux]] is a free and open source operating system that is very common in academic and research settings.&lt;br /&gt;
* [[LaTeX]] is THE standard for typesetting technical papers. Once you learn how to use it, you will never want to write a paper in Word again.&lt;br /&gt;
* [[Gnuplot]] is a simple, yet powerful, command-line plotting program. You can use it to quickly plot data during analysis, or to create publication quality figures.&lt;br /&gt;
* [[Data Analysis]]: this page contains various information related to analyzing data, including error analysis.&lt;br /&gt;
&lt;br /&gt;
===Student/Class Projects===&lt;br /&gt;
&lt;br /&gt;
*The Phys 100, Introduction to Engineering Science, class has been launching high altitude weather balloons as a class project since Fall of 2011. See their project page [[Project | here]].&lt;br /&gt;
&lt;br /&gt;
==Random Unorganized Topics==&lt;br /&gt;
To see a set of unorganized links to various projects that have used this wiki, go [[Unorganized Topics|here]]&lt;br /&gt;
&lt;br /&gt;
== MediaWiki Information ==&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
=== Getting started ===&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=484</id>
		<title>Gnuplot</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=484"/>
				<updated>2013-01-22T22:12:34Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Other Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
==Installation==&lt;br /&gt;
If gnuplot is not already installed on your system, you need to install it. The method of install will depend on your OS and distribution. A few common examples are&lt;br /&gt;
&lt;br /&gt;
;Gentoo&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; emerge gnuplot&lt;br /&gt;
&lt;br /&gt;
;Ubuntu&lt;br /&gt;
 &amp;gt; sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Fedora&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; yum install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Debian&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Windows&lt;br /&gt;
: A windows install file can be downloaded from the gnuplot sourceforge page [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. &lt;br /&gt;
&lt;br /&gt;
;Mac OS X&lt;br /&gt;
: First, download XQuartz from [http://xquartz.macosforge.org/landing/ here] and install. Then download the &amp;lt;code&amp;gt;gnuplot-4.6.0.tar.gz&amp;lt;/code&amp;gt; from [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. Now you will just unpack, configure, build and install gnuplot from source.&lt;br /&gt;
  &amp;gt; tar xzf gnuplot-4.6.0.tar.gz&lt;br /&gt;
  &amp;gt; cd gnuplot-4.6.0&lt;br /&gt;
  &amp;gt; ./configure&lt;br /&gt;
  &amp;gt; make&lt;br /&gt;
  &amp;gt; make install     # run as root.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Other&lt;br /&gt;
: Of course, gnuplot can be built from source on any other Unix based machine such as Mac OS X and Linux.&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
Several good tutorial references exist for gnuplot.  &lt;br /&gt;
&lt;br /&gt;
Gnuplot Official Site (Tutorial/User Manual PDF): [http://www.gnuplot.info/ http://www.gnuplot.info/]&lt;br /&gt;
&lt;br /&gt;
Gnuplot Not So Frequently Asked Questions: [http://t16web.lanl.gov/Kawano/gnuplot/index-e.html http://t16web.lanl.gov/Kawano/gnuplot/index-e.html]&lt;br /&gt;
&lt;br /&gt;
The book, Gnuplot in Action: [http://www.manning.com/janert/ http://www.manning.com/janert/]&lt;br /&gt;
 &lt;br /&gt;
===Plotting===&lt;br /&gt;
gnuplot is a program created to plot stuff. You can plot functions or data. There are two commands for plotting, &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; is used to plot 2D functions while &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt; is used to plot 3D functions. &lt;br /&gt;
&lt;br /&gt;
===Plotting Functions===&lt;br /&gt;
The &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command has the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [ function | 'filename' datafile-modifiers ]&lt;br /&gt;
&lt;br /&gt;
gnuplot has great support for all common (and many uncommon) functions. For example, to plot sin(x),&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_001.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is a special variable that gnuplot reconizes as the dependent variable. Multiple functions can be plotted on the same graph, just separate each with a comma&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x), cos(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_002.png|400px]]&lt;br /&gt;
&lt;br /&gt;
We control the what and how our plot is displayed by setting ''options''. Options are set with the &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; command. For example, to set the graph title, we set the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; option to a string containing the title.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set title &amp;quot;Sine and Cosine&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Notice that the graph does not change after you set the title option. gnuplot will not redraw the graph until we either issue another &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command, or tell it to ''replot'' what we previously plotted with the ...&amp;lt;code&amp;gt;replot&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; replot  # redraw the previous plot with new options&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_003.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Other important options include &amp;lt;code&amp;gt;xlabel&amp;lt;/code&amp;gt; (the x-axis label), &amp;lt;code&amp;gt;ylabel&amp;lt;/code&amp;gt; (the y-axis label) and &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; (sets the position of the legend). The legend is located in the top-right corner of the graph by default, which is in the way in the example above. To label the axis and move the key,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &amp;quot;time (s)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set ylabel &amp;quot;current (A)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set key top left&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_004.png|400px]]&lt;br /&gt;
&lt;br /&gt;
By default, gnuplot will &amp;quot;autoscale&amp;quot; the y axis (when plotting data from a file, the x axis is autoscaled too). To set the x and y axis ranges, set the &amp;lt;code&amp;gt;xrange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yrange&amp;lt;/code&amp;gt; options.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; xrange[0:10]&lt;br /&gt;
 gnuplot&amp;gt; yrange[-2:2]&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_005.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can also set the range directly in the plot command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [x=0:10] sin(x)&lt;br /&gt;
&lt;br /&gt;
Autoscaling can always be re-enabled by setting the &amp;lt;code&amp;gt;autoscale&amp;lt;/code&amp;gt; option&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale&lt;br /&gt;
&lt;br /&gt;
or, to enable autoscaling for the x or y axis individually,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale x   # autoscale the x axis&lt;br /&gt;
 gnuplot&amp;gt; set autoscale y   # autoscale the y axis&lt;br /&gt;
&lt;br /&gt;
gnuplot allows aritrarly complex functions to be plotted. These can either be built directly in the &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
&lt;br /&gt;
or you can define a function and plot it&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; f(x) = sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
 gnuplot&amp;gt; plot f(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_006.png|400px]]&lt;br /&gt;
&lt;br /&gt;
====user-defined functions====&lt;br /&gt;
gnuplot allows the user to define arbitrary functions. Function definitions have the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; function_name(arg1, [arg2, ...] ) = expression&lt;br /&gt;
&lt;br /&gt;
In the example above, we defined a function &amp;lt;code&amp;gt;f(x)&amp;lt;/code&amp;gt; that was a function of only one variable. However, we can define function of multiple variables. This can be very handy if we would like to plot a function with a variable parameter. For example, we may want to plot a Gaussian, but allow the center and width to be changed. We could define a Gauss function,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; gauss(sigma, x0, x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
To plot this function for different values of &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt;, we just provide values directly in the plot command&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,0,x), gauss(0.5,1,x), gausss(1.0,1,x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_007.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that, while we used the variable &amp;lt;code&amp;gt;x&amp;lt;\code&amp;gt; in the definition of &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt;, it is not required. More importantly, we can plot a function agains ''any'' of its arguments.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,x,1)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_008.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot also also supports variables. You can set a variable, and then use it in plot commands or even function definitions. For example, we could set the width and position of a Gaussian function through two variables.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; x0 = 1.5&lt;br /&gt;
 gnuplot&amp;gt; sigma = 0.75&lt;br /&gt;
 gnuplot&amp;gt; gauss2(x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
This function will use the values stored in &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; when it is evaluated. Note that the &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; in the function &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt; will '''not''' use the variables. Function argument names will &amp;quot;hide&amp;quot; variable names. In other words, gnuplot variables have ''scope''.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5, 1, x), gauss2(x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_009.png|400px]]&lt;br /&gt;
&lt;br /&gt;
===plotting data from a file===&lt;br /&gt;
&lt;br /&gt;
We often need to plot data that is stored in a file. Typically this has either been generated from a computer model, or collected in an experiment. gnuplot has a very powerful set of utilities for plotting data from a file. The data files used in the examples that follow can be downloaded here.&lt;br /&gt;
&lt;br /&gt;
[[Media:simple.txt|simple.txt]]&lt;br /&gt;
&lt;br /&gt;
gnuplot reads plain text files in table format: one row per line with columns separated by white space. Each row in the table is used to create ''one'' data point on the graph. The simplest file that gnuplot can read contains just two columns of data points,&lt;br /&gt;
 &amp;gt; cat simple.txt&lt;br /&gt;
   0.0  1.1&lt;br /&gt;
   0.1  1.3&lt;br /&gt;
   0.2  1.4&lt;br /&gt;
   0.3  1.9&lt;br /&gt;
&lt;br /&gt;
gnuplot can plot this file directly,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple.txt'  # note the quote marks&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_010.png|400px]]&lt;br /&gt;
&lt;br /&gt;
This turns out to be fairly convenient because it is not very difficult to write code to write files in this format&lt;br /&gt;
&lt;br /&gt;
  // C&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    printf( fp, &amp;quot;%f %f\n&amp;quot;, x[i], y[i] );&lt;br /&gt;
  &lt;br /&gt;
  // C++&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    std::cout&amp;lt;&amp;lt;x[i]&amp;lt;&amp;lt;&amp;quot; &amp;quot;&amp;lt;&amp;lt;y[i]&amp;lt;&amp;lt;std::endl;&lt;br /&gt;
&lt;br /&gt;
When analyzing data, this is often all that is required to see trends. However, if we are going to show out graph to anybody else, we will certainly want to fix it up.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel 'x (arbitrary)'  # arbitrary units on the x-axis&lt;br /&gt;
 gnuplot&amp;gt; set ylabel 'y (arbitrary)'  # arbitrary units on the y-axis&lt;br /&gt;
 gnuplot&amp;gt; set title 'Simple Graph'&lt;br /&gt;
 gnuplot&amp;gt; set xrange[-.1:.4]          # widen xrange to see endpoints&lt;br /&gt;
 gnuplot&amp;gt; set yrange[1:2]             # same for yrange&lt;br /&gt;
 gnuplot&amp;gt; set key left                # move key to left, out of the way&lt;br /&gt;
 gnuplot&amp;gt; replot                      # dont' forget to replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_011.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot can display data points as points (as above), lines, or points connected by lines. This is controlled by setting the &amp;lt;code&amp;gt;style&amp;lt;/code&amp;gt; option for &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data lines&lt;br /&gt;
 gnuplot&amp;gt; rep                   # rep is shorthand for replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data linespoints&lt;br /&gt;
 gnuplot&amp;gt; rep&lt;br /&gt;
&lt;br /&gt;
=====choosing and manipulating data=====&lt;br /&gt;
The data we want to plot may be in a file with multiple columns. By default, gnuplot will read the file and use only the first two columns. The first column is used for the x coordinate, the second column is used for y.&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cat simple2.txt&lt;br /&gt;
 0.0  1.1  2.4  5.4&lt;br /&gt;
 0.1  1.3  2.7  6.3&lt;br /&gt;
 0.2  1.4  2.9  7.5&lt;br /&gt;
 0.3  1.9  3.1  9.1&lt;br /&gt;
&lt;br /&gt;
Plotting this file will give the same graph as the previous file. However, to plot the 3rd column of data, we add the &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple2.txt' using 1:3&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier selects the columns to use in the plot. As expected, the above plot command selects the first and third columns.&lt;br /&gt;
&lt;br /&gt;
;using&lt;br /&gt;
: select columns from&lt;br /&gt;
&lt;br /&gt;
====lines vs. points====&lt;br /&gt;
By default, gnuplot will plot data as ''points''. To change this, we can set the data style to ''lines'' or ''linespoints'' (actually, other styles exist, but are much less common).&lt;br /&gt;
&lt;br /&gt;
==Creating Pictures==&lt;br /&gt;
gnuplot separates the concept of ''creating'' a plot and ''outputting'' a plot. Basically, all of the work required to construct a plot (reading in data points from a file, evaluating functions, etc) is independent of how the plot will be displayed. For example, you may want to the plot to be displayed on the screen, or written to a jpg. gnuplot uses the idea of ''terminals'' to support outputting plots to multiple formats. To output a plot to a jpeg, you tell gnuplot to write to the jpeg terminal type. To output a plot a png, you tell gnuplot to write to the png terminal type. You get the idea.&lt;br /&gt;
&lt;br /&gt;
To change the terminal type, set the &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; option. For example, to create a png, set the terminal type to png.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set terminal png&lt;br /&gt;
&lt;br /&gt;
==Gnuplot Scripts==&lt;br /&gt;
The commands for creation of a gnuplot graph can be assembled as a text file and run as a gnuplot script by&lt;br /&gt;
executing a command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;gnuplot &amp;quot;script_file_name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Gnuplot will execute the commands within the file.  Here, the common use is to set the output terminal to postscript or some other format and viewed by an external viewer, like Okular.  &lt;br /&gt;
&lt;br /&gt;
A second method is to load a file from within gnuplot with the load command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; load &amp;quot;script_file-name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Using this method, additional changes may be made to the graph with the interactive command line.&lt;br /&gt;
&lt;br /&gt;
==Graphical Interfaces==&lt;br /&gt;
A number of graphical user interfaces exist for gnuplot.  A common interface within Linux is &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt;.  The &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt; package can typically be found along with gnuplot and installed in a similar fashion as described above.&lt;br /&gt;
&lt;br /&gt;
Graphical interfaces are categorically frowned upon by this Department and its collaborators.&lt;br /&gt;
&lt;br /&gt;
==Other Reading==&lt;br /&gt;
&lt;br /&gt;
* [http://www-128.ibm.com/developerworks/library/l-gnuplot/ Visualize your data with gnuplot]: an IBM tutorial&lt;br /&gt;
* [http://www.gnuplotting.org/ gnuplotting]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://spplotters.blogspot.com/ spplotters]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://gnuplot-surprising.blogspot.com/ gnuplot surprising]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://linuxgazette.net/168/misc/lg/2_cent_tip__piping_to_gnu_plot_from_c.html Linux Gazette]: piping from C to gnuplot&lt;br /&gt;
* [http://gnuplot-tricks.blogspot.com/2009/05/gnuplot-tricks-many-say-that-it-is.html Gnuplot Tips Blog]: Make publication quality plots with EPS terminal and include symbols&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=483</id>
		<title>Gnuplot</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=483"/>
				<updated>2013-01-22T22:11:33Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Other Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
==Installation==&lt;br /&gt;
If gnuplot is not already installed on your system, you need to install it. The method of install will depend on your OS and distribution. A few common examples are&lt;br /&gt;
&lt;br /&gt;
;Gentoo&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; emerge gnuplot&lt;br /&gt;
&lt;br /&gt;
;Ubuntu&lt;br /&gt;
 &amp;gt; sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Fedora&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; yum install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Debian&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Windows&lt;br /&gt;
: A windows install file can be downloaded from the gnuplot sourceforge page [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. &lt;br /&gt;
&lt;br /&gt;
;Mac OS X&lt;br /&gt;
: First, download XQuartz from [http://xquartz.macosforge.org/landing/ here] and install. Then download the &amp;lt;code&amp;gt;gnuplot-4.6.0.tar.gz&amp;lt;/code&amp;gt; from [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. Now you will just unpack, configure, build and install gnuplot from source.&lt;br /&gt;
  &amp;gt; tar xzf gnuplot-4.6.0.tar.gz&lt;br /&gt;
  &amp;gt; cd gnuplot-4.6.0&lt;br /&gt;
  &amp;gt; ./configure&lt;br /&gt;
  &amp;gt; make&lt;br /&gt;
  &amp;gt; make install     # run as root.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Other&lt;br /&gt;
: Of course, gnuplot can be built from source on any other Unix based machine such as Mac OS X and Linux.&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
Several good tutorial references exist for gnuplot.  &lt;br /&gt;
&lt;br /&gt;
Gnuplot Official Site (Tutorial/User Manual PDF): [http://www.gnuplot.info/ http://www.gnuplot.info/]&lt;br /&gt;
&lt;br /&gt;
Gnuplot Not So Frequently Asked Questions: [http://t16web.lanl.gov/Kawano/gnuplot/index-e.html http://t16web.lanl.gov/Kawano/gnuplot/index-e.html]&lt;br /&gt;
&lt;br /&gt;
The book, Gnuplot in Action: [http://www.manning.com/janert/ http://www.manning.com/janert/]&lt;br /&gt;
 &lt;br /&gt;
===Plotting===&lt;br /&gt;
gnuplot is a program created to plot stuff. You can plot functions or data. There are two commands for plotting, &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; is used to plot 2D functions while &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt; is used to plot 3D functions. &lt;br /&gt;
&lt;br /&gt;
===Plotting Functions===&lt;br /&gt;
The &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command has the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [ function | 'filename' datafile-modifiers ]&lt;br /&gt;
&lt;br /&gt;
gnuplot has great support for all common (and many uncommon) functions. For example, to plot sin(x),&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_001.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is a special variable that gnuplot reconizes as the dependent variable. Multiple functions can be plotted on the same graph, just separate each with a comma&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x), cos(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_002.png|400px]]&lt;br /&gt;
&lt;br /&gt;
We control the what and how our plot is displayed by setting ''options''. Options are set with the &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; command. For example, to set the graph title, we set the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; option to a string containing the title.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set title &amp;quot;Sine and Cosine&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Notice that the graph does not change after you set the title option. gnuplot will not redraw the graph until we either issue another &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command, or tell it to ''replot'' what we previously plotted with the ...&amp;lt;code&amp;gt;replot&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; replot  # redraw the previous plot with new options&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_003.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Other important options include &amp;lt;code&amp;gt;xlabel&amp;lt;/code&amp;gt; (the x-axis label), &amp;lt;code&amp;gt;ylabel&amp;lt;/code&amp;gt; (the y-axis label) and &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; (sets the position of the legend). The legend is located in the top-right corner of the graph by default, which is in the way in the example above. To label the axis and move the key,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &amp;quot;time (s)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set ylabel &amp;quot;current (A)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set key top left&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_004.png|400px]]&lt;br /&gt;
&lt;br /&gt;
By default, gnuplot will &amp;quot;autoscale&amp;quot; the y axis (when plotting data from a file, the x axis is autoscaled too). To set the x and y axis ranges, set the &amp;lt;code&amp;gt;xrange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yrange&amp;lt;/code&amp;gt; options.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; xrange[0:10]&lt;br /&gt;
 gnuplot&amp;gt; yrange[-2:2]&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_005.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can also set the range directly in the plot command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [x=0:10] sin(x)&lt;br /&gt;
&lt;br /&gt;
Autoscaling can always be re-enabled by setting the &amp;lt;code&amp;gt;autoscale&amp;lt;/code&amp;gt; option&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale&lt;br /&gt;
&lt;br /&gt;
or, to enable autoscaling for the x or y axis individually,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale x   # autoscale the x axis&lt;br /&gt;
 gnuplot&amp;gt; set autoscale y   # autoscale the y axis&lt;br /&gt;
&lt;br /&gt;
gnuplot allows aritrarly complex functions to be plotted. These can either be built directly in the &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
&lt;br /&gt;
or you can define a function and plot it&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; f(x) = sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
 gnuplot&amp;gt; plot f(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_006.png|400px]]&lt;br /&gt;
&lt;br /&gt;
====user-defined functions====&lt;br /&gt;
gnuplot allows the user to define arbitrary functions. Function definitions have the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; function_name(arg1, [arg2, ...] ) = expression&lt;br /&gt;
&lt;br /&gt;
In the example above, we defined a function &amp;lt;code&amp;gt;f(x)&amp;lt;/code&amp;gt; that was a function of only one variable. However, we can define function of multiple variables. This can be very handy if we would like to plot a function with a variable parameter. For example, we may want to plot a Gaussian, but allow the center and width to be changed. We could define a Gauss function,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; gauss(sigma, x0, x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
To plot this function for different values of &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt;, we just provide values directly in the plot command&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,0,x), gauss(0.5,1,x), gausss(1.0,1,x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_007.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that, while we used the variable &amp;lt;code&amp;gt;x&amp;lt;\code&amp;gt; in the definition of &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt;, it is not required. More importantly, we can plot a function agains ''any'' of its arguments.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,x,1)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_008.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot also also supports variables. You can set a variable, and then use it in plot commands or even function definitions. For example, we could set the width and position of a Gaussian function through two variables.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; x0 = 1.5&lt;br /&gt;
 gnuplot&amp;gt; sigma = 0.75&lt;br /&gt;
 gnuplot&amp;gt; gauss2(x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
This function will use the values stored in &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; when it is evaluated. Note that the &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; in the function &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt; will '''not''' use the variables. Function argument names will &amp;quot;hide&amp;quot; variable names. In other words, gnuplot variables have ''scope''.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5, 1, x), gauss2(x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_009.png|400px]]&lt;br /&gt;
&lt;br /&gt;
===plotting data from a file===&lt;br /&gt;
&lt;br /&gt;
We often need to plot data that is stored in a file. Typically this has either been generated from a computer model, or collected in an experiment. gnuplot has a very powerful set of utilities for plotting data from a file. The data files used in the examples that follow can be downloaded here.&lt;br /&gt;
&lt;br /&gt;
[[Media:simple.txt|simple.txt]]&lt;br /&gt;
&lt;br /&gt;
gnuplot reads plain text files in table format: one row per line with columns separated by white space. Each row in the table is used to create ''one'' data point on the graph. The simplest file that gnuplot can read contains just two columns of data points,&lt;br /&gt;
 &amp;gt; cat simple.txt&lt;br /&gt;
   0.0  1.1&lt;br /&gt;
   0.1  1.3&lt;br /&gt;
   0.2  1.4&lt;br /&gt;
   0.3  1.9&lt;br /&gt;
&lt;br /&gt;
gnuplot can plot this file directly,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple.txt'  # note the quote marks&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_010.png|400px]]&lt;br /&gt;
&lt;br /&gt;
This turns out to be fairly convenient because it is not very difficult to write code to write files in this format&lt;br /&gt;
&lt;br /&gt;
  // C&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    printf( fp, &amp;quot;%f %f\n&amp;quot;, x[i], y[i] );&lt;br /&gt;
  &lt;br /&gt;
  // C++&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    std::cout&amp;lt;&amp;lt;x[i]&amp;lt;&amp;lt;&amp;quot; &amp;quot;&amp;lt;&amp;lt;y[i]&amp;lt;&amp;lt;std::endl;&lt;br /&gt;
&lt;br /&gt;
When analyzing data, this is often all that is required to see trends. However, if we are going to show out graph to anybody else, we will certainly want to fix it up.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel 'x (arbitrary)'  # arbitrary units on the x-axis&lt;br /&gt;
 gnuplot&amp;gt; set ylabel 'y (arbitrary)'  # arbitrary units on the y-axis&lt;br /&gt;
 gnuplot&amp;gt; set title 'Simple Graph'&lt;br /&gt;
 gnuplot&amp;gt; set xrange[-.1:.4]          # widen xrange to see endpoints&lt;br /&gt;
 gnuplot&amp;gt; set yrange[1:2]             # same for yrange&lt;br /&gt;
 gnuplot&amp;gt; set key left                # move key to left, out of the way&lt;br /&gt;
 gnuplot&amp;gt; replot                      # dont' forget to replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_011.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot can display data points as points (as above), lines, or points connected by lines. This is controlled by setting the &amp;lt;code&amp;gt;style&amp;lt;/code&amp;gt; option for &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data lines&lt;br /&gt;
 gnuplot&amp;gt; rep                   # rep is shorthand for replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data linespoints&lt;br /&gt;
 gnuplot&amp;gt; rep&lt;br /&gt;
&lt;br /&gt;
=====choosing and manipulating data=====&lt;br /&gt;
The data we want to plot may be in a file with multiple columns. By default, gnuplot will read the file and use only the first two columns. The first column is used for the x coordinate, the second column is used for y.&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cat simple2.txt&lt;br /&gt;
 0.0  1.1  2.4  5.4&lt;br /&gt;
 0.1  1.3  2.7  6.3&lt;br /&gt;
 0.2  1.4  2.9  7.5&lt;br /&gt;
 0.3  1.9  3.1  9.1&lt;br /&gt;
&lt;br /&gt;
Plotting this file will give the same graph as the previous file. However, to plot the 3rd column of data, we add the &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple2.txt' using 1:3&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier selects the columns to use in the plot. As expected, the above plot command selects the first and third columns.&lt;br /&gt;
&lt;br /&gt;
;using&lt;br /&gt;
: select columns from&lt;br /&gt;
&lt;br /&gt;
====lines vs. points====&lt;br /&gt;
By default, gnuplot will plot data as ''points''. To change this, we can set the data style to ''lines'' or ''linespoints'' (actually, other styles exist, but are much less common).&lt;br /&gt;
&lt;br /&gt;
==Creating Pictures==&lt;br /&gt;
gnuplot separates the concept of ''creating'' a plot and ''outputting'' a plot. Basically, all of the work required to construct a plot (reading in data points from a file, evaluating functions, etc) is independent of how the plot will be displayed. For example, you may want to the plot to be displayed on the screen, or written to a jpg. gnuplot uses the idea of ''terminals'' to support outputting plots to multiple formats. To output a plot to a jpeg, you tell gnuplot to write to the jpeg terminal type. To output a plot a png, you tell gnuplot to write to the png terminal type. You get the idea.&lt;br /&gt;
&lt;br /&gt;
To change the terminal type, set the &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; option. For example, to create a png, set the terminal type to png.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set terminal png&lt;br /&gt;
&lt;br /&gt;
==Gnuplot Scripts==&lt;br /&gt;
The commands for creation of a gnuplot graph can be assembled as a text file and run as a gnuplot script by&lt;br /&gt;
executing a command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;gnuplot &amp;quot;script_file_name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Gnuplot will execute the commands within the file.  Here, the common use is to set the output terminal to postscript or some other format and viewed by an external viewer, like Okular.  &lt;br /&gt;
&lt;br /&gt;
A second method is to load a file from within gnuplot with the load command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; load &amp;quot;script_file-name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Using this method, additional changes may be made to the graph with the interactive command line.&lt;br /&gt;
&lt;br /&gt;
==Graphical Interfaces==&lt;br /&gt;
A number of graphical user interfaces exist for gnuplot.  A common interface within Linux is &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt;.  The &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt; package can typically be found along with gnuplot and installed in a similar fashion as described above.&lt;br /&gt;
&lt;br /&gt;
Graphical interfaces are categorically frowned upon by this Department and its collaborators.&lt;br /&gt;
&lt;br /&gt;
==Other Reading==&lt;br /&gt;
&lt;br /&gt;
* [http://www-128.ibm.com/developerworks/library/l-gnuplot/ Visualize your data with gnuplot]: an IBM tutorial&lt;br /&gt;
* [http://www.gnuplotting.org/ gnuplotting]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://spplotters.blogspot.com/ spplotters]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://gnuplot-surprising.blogspot.com/ gnuplot surprising]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://linuxgazette.net/168/misc/lg/2_cent_tip__piping_to_gnu_plot_from_c.html Linux Gazette]: piping from C to gnuplot&lt;br /&gt;
* [http://gnuplot-tricks.blogspot.com/2009/05/gnuplot-tricks-many-say-that-it-is.html Gnuplot Tips]: Make publication quality plots with EPS terminal&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=482</id>
		<title>Gnuplot</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=482"/>
				<updated>2013-01-22T22:08:58Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Other Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
==Installation==&lt;br /&gt;
If gnuplot is not already installed on your system, you need to install it. The method of install will depend on your OS and distribution. A few common examples are&lt;br /&gt;
&lt;br /&gt;
;Gentoo&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; emerge gnuplot&lt;br /&gt;
&lt;br /&gt;
;Ubuntu&lt;br /&gt;
 &amp;gt; sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Fedora&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; yum install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Debian&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Windows&lt;br /&gt;
: A windows install file can be downloaded from the gnuplot sourceforge page [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. &lt;br /&gt;
&lt;br /&gt;
;Mac OS X&lt;br /&gt;
: First, download XQuartz from [http://xquartz.macosforge.org/landing/ here] and install. Then download the &amp;lt;code&amp;gt;gnuplot-4.6.0.tar.gz&amp;lt;/code&amp;gt; from [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. Now you will just unpack, configure, build and install gnuplot from source.&lt;br /&gt;
  &amp;gt; tar xzf gnuplot-4.6.0.tar.gz&lt;br /&gt;
  &amp;gt; cd gnuplot-4.6.0&lt;br /&gt;
  &amp;gt; ./configure&lt;br /&gt;
  &amp;gt; make&lt;br /&gt;
  &amp;gt; make install     # run as root.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Other&lt;br /&gt;
: Of course, gnuplot can be built from source on any other Unix based machine such as Mac OS X and Linux.&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
Several good tutorial references exist for gnuplot.  &lt;br /&gt;
&lt;br /&gt;
Gnuplot Official Site (Tutorial/User Manual PDF): [http://www.gnuplot.info/ http://www.gnuplot.info/]&lt;br /&gt;
&lt;br /&gt;
Gnuplot Not So Frequently Asked Questions: [http://t16web.lanl.gov/Kawano/gnuplot/index-e.html http://t16web.lanl.gov/Kawano/gnuplot/index-e.html]&lt;br /&gt;
&lt;br /&gt;
The book, Gnuplot in Action: [http://www.manning.com/janert/ http://www.manning.com/janert/]&lt;br /&gt;
 &lt;br /&gt;
===Plotting===&lt;br /&gt;
gnuplot is a program created to plot stuff. You can plot functions or data. There are two commands for plotting, &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; is used to plot 2D functions while &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt; is used to plot 3D functions. &lt;br /&gt;
&lt;br /&gt;
===Plotting Functions===&lt;br /&gt;
The &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command has the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [ function | 'filename' datafile-modifiers ]&lt;br /&gt;
&lt;br /&gt;
gnuplot has great support for all common (and many uncommon) functions. For example, to plot sin(x),&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_001.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is a special variable that gnuplot reconizes as the dependent variable. Multiple functions can be plotted on the same graph, just separate each with a comma&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x), cos(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_002.png|400px]]&lt;br /&gt;
&lt;br /&gt;
We control the what and how our plot is displayed by setting ''options''. Options are set with the &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; command. For example, to set the graph title, we set the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; option to a string containing the title.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set title &amp;quot;Sine and Cosine&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Notice that the graph does not change after you set the title option. gnuplot will not redraw the graph until we either issue another &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command, or tell it to ''replot'' what we previously plotted with the ...&amp;lt;code&amp;gt;replot&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; replot  # redraw the previous plot with new options&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_003.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Other important options include &amp;lt;code&amp;gt;xlabel&amp;lt;/code&amp;gt; (the x-axis label), &amp;lt;code&amp;gt;ylabel&amp;lt;/code&amp;gt; (the y-axis label) and &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; (sets the position of the legend). The legend is located in the top-right corner of the graph by default, which is in the way in the example above. To label the axis and move the key,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &amp;quot;time (s)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set ylabel &amp;quot;current (A)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set key top left&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_004.png|400px]]&lt;br /&gt;
&lt;br /&gt;
By default, gnuplot will &amp;quot;autoscale&amp;quot; the y axis (when plotting data from a file, the x axis is autoscaled too). To set the x and y axis ranges, set the &amp;lt;code&amp;gt;xrange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yrange&amp;lt;/code&amp;gt; options.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; xrange[0:10]&lt;br /&gt;
 gnuplot&amp;gt; yrange[-2:2]&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_005.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can also set the range directly in the plot command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [x=0:10] sin(x)&lt;br /&gt;
&lt;br /&gt;
Autoscaling can always be re-enabled by setting the &amp;lt;code&amp;gt;autoscale&amp;lt;/code&amp;gt; option&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale&lt;br /&gt;
&lt;br /&gt;
or, to enable autoscaling for the x or y axis individually,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale x   # autoscale the x axis&lt;br /&gt;
 gnuplot&amp;gt; set autoscale y   # autoscale the y axis&lt;br /&gt;
&lt;br /&gt;
gnuplot allows aritrarly complex functions to be plotted. These can either be built directly in the &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
&lt;br /&gt;
or you can define a function and plot it&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; f(x) = sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
 gnuplot&amp;gt; plot f(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_006.png|400px]]&lt;br /&gt;
&lt;br /&gt;
====user-defined functions====&lt;br /&gt;
gnuplot allows the user to define arbitrary functions. Function definitions have the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; function_name(arg1, [arg2, ...] ) = expression&lt;br /&gt;
&lt;br /&gt;
In the example above, we defined a function &amp;lt;code&amp;gt;f(x)&amp;lt;/code&amp;gt; that was a function of only one variable. However, we can define function of multiple variables. This can be very handy if we would like to plot a function with a variable parameter. For example, we may want to plot a Gaussian, but allow the center and width to be changed. We could define a Gauss function,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; gauss(sigma, x0, x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
To plot this function for different values of &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt;, we just provide values directly in the plot command&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,0,x), gauss(0.5,1,x), gausss(1.0,1,x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_007.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that, while we used the variable &amp;lt;code&amp;gt;x&amp;lt;\code&amp;gt; in the definition of &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt;, it is not required. More importantly, we can plot a function agains ''any'' of its arguments.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,x,1)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_008.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot also also supports variables. You can set a variable, and then use it in plot commands or even function definitions. For example, we could set the width and position of a Gaussian function through two variables.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; x0 = 1.5&lt;br /&gt;
 gnuplot&amp;gt; sigma = 0.75&lt;br /&gt;
 gnuplot&amp;gt; gauss2(x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
This function will use the values stored in &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; when it is evaluated. Note that the &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; in the function &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt; will '''not''' use the variables. Function argument names will &amp;quot;hide&amp;quot; variable names. In other words, gnuplot variables have ''scope''.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5, 1, x), gauss2(x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_009.png|400px]]&lt;br /&gt;
&lt;br /&gt;
===plotting data from a file===&lt;br /&gt;
&lt;br /&gt;
We often need to plot data that is stored in a file. Typically this has either been generated from a computer model, or collected in an experiment. gnuplot has a very powerful set of utilities for plotting data from a file. The data files used in the examples that follow can be downloaded here.&lt;br /&gt;
&lt;br /&gt;
[[Media:simple.txt|simple.txt]]&lt;br /&gt;
&lt;br /&gt;
gnuplot reads plain text files in table format: one row per line with columns separated by white space. Each row in the table is used to create ''one'' data point on the graph. The simplest file that gnuplot can read contains just two columns of data points,&lt;br /&gt;
 &amp;gt; cat simple.txt&lt;br /&gt;
   0.0  1.1&lt;br /&gt;
   0.1  1.3&lt;br /&gt;
   0.2  1.4&lt;br /&gt;
   0.3  1.9&lt;br /&gt;
&lt;br /&gt;
gnuplot can plot this file directly,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple.txt'  # note the quote marks&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_010.png|400px]]&lt;br /&gt;
&lt;br /&gt;
This turns out to be fairly convenient because it is not very difficult to write code to write files in this format&lt;br /&gt;
&lt;br /&gt;
  // C&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    printf( fp, &amp;quot;%f %f\n&amp;quot;, x[i], y[i] );&lt;br /&gt;
  &lt;br /&gt;
  // C++&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    std::cout&amp;lt;&amp;lt;x[i]&amp;lt;&amp;lt;&amp;quot; &amp;quot;&amp;lt;&amp;lt;y[i]&amp;lt;&amp;lt;std::endl;&lt;br /&gt;
&lt;br /&gt;
When analyzing data, this is often all that is required to see trends. However, if we are going to show out graph to anybody else, we will certainly want to fix it up.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel 'x (arbitrary)'  # arbitrary units on the x-axis&lt;br /&gt;
 gnuplot&amp;gt; set ylabel 'y (arbitrary)'  # arbitrary units on the y-axis&lt;br /&gt;
 gnuplot&amp;gt; set title 'Simple Graph'&lt;br /&gt;
 gnuplot&amp;gt; set xrange[-.1:.4]          # widen xrange to see endpoints&lt;br /&gt;
 gnuplot&amp;gt; set yrange[1:2]             # same for yrange&lt;br /&gt;
 gnuplot&amp;gt; set key left                # move key to left, out of the way&lt;br /&gt;
 gnuplot&amp;gt; replot                      # dont' forget to replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_011.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot can display data points as points (as above), lines, or points connected by lines. This is controlled by setting the &amp;lt;code&amp;gt;style&amp;lt;/code&amp;gt; option for &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data lines&lt;br /&gt;
 gnuplot&amp;gt; rep                   # rep is shorthand for replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data linespoints&lt;br /&gt;
 gnuplot&amp;gt; rep&lt;br /&gt;
&lt;br /&gt;
=====choosing and manipulating data=====&lt;br /&gt;
The data we want to plot may be in a file with multiple columns. By default, gnuplot will read the file and use only the first two columns. The first column is used for the x coordinate, the second column is used for y.&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cat simple2.txt&lt;br /&gt;
 0.0  1.1  2.4  5.4&lt;br /&gt;
 0.1  1.3  2.7  6.3&lt;br /&gt;
 0.2  1.4  2.9  7.5&lt;br /&gt;
 0.3  1.9  3.1  9.1&lt;br /&gt;
&lt;br /&gt;
Plotting this file will give the same graph as the previous file. However, to plot the 3rd column of data, we add the &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple2.txt' using 1:3&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier selects the columns to use in the plot. As expected, the above plot command selects the first and third columns.&lt;br /&gt;
&lt;br /&gt;
;using&lt;br /&gt;
: select columns from&lt;br /&gt;
&lt;br /&gt;
====lines vs. points====&lt;br /&gt;
By default, gnuplot will plot data as ''points''. To change this, we can set the data style to ''lines'' or ''linespoints'' (actually, other styles exist, but are much less common).&lt;br /&gt;
&lt;br /&gt;
==Creating Pictures==&lt;br /&gt;
gnuplot separates the concept of ''creating'' a plot and ''outputting'' a plot. Basically, all of the work required to construct a plot (reading in data points from a file, evaluating functions, etc) is independent of how the plot will be displayed. For example, you may want to the plot to be displayed on the screen, or written to a jpg. gnuplot uses the idea of ''terminals'' to support outputting plots to multiple formats. To output a plot to a jpeg, you tell gnuplot to write to the jpeg terminal type. To output a plot a png, you tell gnuplot to write to the png terminal type. You get the idea.&lt;br /&gt;
&lt;br /&gt;
To change the terminal type, set the &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; option. For example, to create a png, set the terminal type to png.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set terminal png&lt;br /&gt;
&lt;br /&gt;
==Gnuplot Scripts==&lt;br /&gt;
The commands for creation of a gnuplot graph can be assembled as a text file and run as a gnuplot script by&lt;br /&gt;
executing a command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;gnuplot &amp;quot;script_file_name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Gnuplot will execute the commands within the file.  Here, the common use is to set the output terminal to postscript or some other format and viewed by an external viewer, like Okular.  &lt;br /&gt;
&lt;br /&gt;
A second method is to load a file from within gnuplot with the load command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; load &amp;quot;script_file-name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Using this method, additional changes may be made to the graph with the interactive command line.&lt;br /&gt;
&lt;br /&gt;
==Graphical Interfaces==&lt;br /&gt;
A number of graphical user interfaces exist for gnuplot.  A common interface within Linux is &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt;.  The &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt; package can typically be found along with gnuplot and installed in a similar fashion as described above.&lt;br /&gt;
&lt;br /&gt;
Graphical interfaces are categorically frowned upon by this Department and its collaborators.&lt;br /&gt;
&lt;br /&gt;
==Other Reading==&lt;br /&gt;
&lt;br /&gt;
* [http://www-128.ibm.com/developerworks/library/l-gnuplot/ Visualize your data with gnuplot]: an IBM tutorial&lt;br /&gt;
* [http://www.gnuplotting.org/ gnuplotting]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://spplotters.blogspot.com/ spplotters]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://gnuplot-surprising.blogspot.com/ gnuplot surprising]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://linuxgazette.net/168/misc/lg/2_cent_tip__piping_to_gnu_plot_from_c.html Linux Gazette]: piping from C to gnuplot&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=481</id>
		<title>Gnuplot</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=481"/>
				<updated>2013-01-22T22:08:17Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Other Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
==Installation==&lt;br /&gt;
If gnuplot is not already installed on your system, you need to install it. The method of install will depend on your OS and distribution. A few common examples are&lt;br /&gt;
&lt;br /&gt;
;Gentoo&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; emerge gnuplot&lt;br /&gt;
&lt;br /&gt;
;Ubuntu&lt;br /&gt;
 &amp;gt; sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Fedora&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; yum install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Debian&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Windows&lt;br /&gt;
: A windows install file can be downloaded from the gnuplot sourceforge page [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. &lt;br /&gt;
&lt;br /&gt;
;Mac OS X&lt;br /&gt;
: First, download XQuartz from [http://xquartz.macosforge.org/landing/ here] and install. Then download the &amp;lt;code&amp;gt;gnuplot-4.6.0.tar.gz&amp;lt;/code&amp;gt; from [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. Now you will just unpack, configure, build and install gnuplot from source.&lt;br /&gt;
  &amp;gt; tar xzf gnuplot-4.6.0.tar.gz&lt;br /&gt;
  &amp;gt; cd gnuplot-4.6.0&lt;br /&gt;
  &amp;gt; ./configure&lt;br /&gt;
  &amp;gt; make&lt;br /&gt;
  &amp;gt; make install     # run as root.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Other&lt;br /&gt;
: Of course, gnuplot can be built from source on any other Unix based machine such as Mac OS X and Linux.&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
Several good tutorial references exist for gnuplot.  &lt;br /&gt;
&lt;br /&gt;
Gnuplot Official Site (Tutorial/User Manual PDF): [http://www.gnuplot.info/ http://www.gnuplot.info/]&lt;br /&gt;
&lt;br /&gt;
Gnuplot Not So Frequently Asked Questions: [http://t16web.lanl.gov/Kawano/gnuplot/index-e.html http://t16web.lanl.gov/Kawano/gnuplot/index-e.html]&lt;br /&gt;
&lt;br /&gt;
The book, Gnuplot in Action: [http://www.manning.com/janert/ http://www.manning.com/janert/]&lt;br /&gt;
 &lt;br /&gt;
===Plotting===&lt;br /&gt;
gnuplot is a program created to plot stuff. You can plot functions or data. There are two commands for plotting, &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; is used to plot 2D functions while &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt; is used to plot 3D functions. &lt;br /&gt;
&lt;br /&gt;
===Plotting Functions===&lt;br /&gt;
The &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command has the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [ function | 'filename' datafile-modifiers ]&lt;br /&gt;
&lt;br /&gt;
gnuplot has great support for all common (and many uncommon) functions. For example, to plot sin(x),&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_001.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is a special variable that gnuplot reconizes as the dependent variable. Multiple functions can be plotted on the same graph, just separate each with a comma&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x), cos(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_002.png|400px]]&lt;br /&gt;
&lt;br /&gt;
We control the what and how our plot is displayed by setting ''options''. Options are set with the &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; command. For example, to set the graph title, we set the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; option to a string containing the title.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set title &amp;quot;Sine and Cosine&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Notice that the graph does not change after you set the title option. gnuplot will not redraw the graph until we either issue another &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command, or tell it to ''replot'' what we previously plotted with the ...&amp;lt;code&amp;gt;replot&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; replot  # redraw the previous plot with new options&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_003.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Other important options include &amp;lt;code&amp;gt;xlabel&amp;lt;/code&amp;gt; (the x-axis label), &amp;lt;code&amp;gt;ylabel&amp;lt;/code&amp;gt; (the y-axis label) and &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; (sets the position of the legend). The legend is located in the top-right corner of the graph by default, which is in the way in the example above. To label the axis and move the key,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &amp;quot;time (s)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set ylabel &amp;quot;current (A)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set key top left&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_004.png|400px]]&lt;br /&gt;
&lt;br /&gt;
By default, gnuplot will &amp;quot;autoscale&amp;quot; the y axis (when plotting data from a file, the x axis is autoscaled too). To set the x and y axis ranges, set the &amp;lt;code&amp;gt;xrange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yrange&amp;lt;/code&amp;gt; options.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; xrange[0:10]&lt;br /&gt;
 gnuplot&amp;gt; yrange[-2:2]&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_005.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can also set the range directly in the plot command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [x=0:10] sin(x)&lt;br /&gt;
&lt;br /&gt;
Autoscaling can always be re-enabled by setting the &amp;lt;code&amp;gt;autoscale&amp;lt;/code&amp;gt; option&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale&lt;br /&gt;
&lt;br /&gt;
or, to enable autoscaling for the x or y axis individually,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale x   # autoscale the x axis&lt;br /&gt;
 gnuplot&amp;gt; set autoscale y   # autoscale the y axis&lt;br /&gt;
&lt;br /&gt;
gnuplot allows aritrarly complex functions to be plotted. These can either be built directly in the &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
&lt;br /&gt;
or you can define a function and plot it&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; f(x) = sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
 gnuplot&amp;gt; plot f(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_006.png|400px]]&lt;br /&gt;
&lt;br /&gt;
====user-defined functions====&lt;br /&gt;
gnuplot allows the user to define arbitrary functions. Function definitions have the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; function_name(arg1, [arg2, ...] ) = expression&lt;br /&gt;
&lt;br /&gt;
In the example above, we defined a function &amp;lt;code&amp;gt;f(x)&amp;lt;/code&amp;gt; that was a function of only one variable. However, we can define function of multiple variables. This can be very handy if we would like to plot a function with a variable parameter. For example, we may want to plot a Gaussian, but allow the center and width to be changed. We could define a Gauss function,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; gauss(sigma, x0, x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
To plot this function for different values of &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt;, we just provide values directly in the plot command&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,0,x), gauss(0.5,1,x), gausss(1.0,1,x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_007.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that, while we used the variable &amp;lt;code&amp;gt;x&amp;lt;\code&amp;gt; in the definition of &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt;, it is not required. More importantly, we can plot a function agains ''any'' of its arguments.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,x,1)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_008.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot also also supports variables. You can set a variable, and then use it in plot commands or even function definitions. For example, we could set the width and position of a Gaussian function through two variables.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; x0 = 1.5&lt;br /&gt;
 gnuplot&amp;gt; sigma = 0.75&lt;br /&gt;
 gnuplot&amp;gt; gauss2(x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
This function will use the values stored in &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; when it is evaluated. Note that the &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; in the function &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt; will '''not''' use the variables. Function argument names will &amp;quot;hide&amp;quot; variable names. In other words, gnuplot variables have ''scope''.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5, 1, x), gauss2(x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_009.png|400px]]&lt;br /&gt;
&lt;br /&gt;
===plotting data from a file===&lt;br /&gt;
&lt;br /&gt;
We often need to plot data that is stored in a file. Typically this has either been generated from a computer model, or collected in an experiment. gnuplot has a very powerful set of utilities for plotting data from a file. The data files used in the examples that follow can be downloaded here.&lt;br /&gt;
&lt;br /&gt;
[[Media:simple.txt|simple.txt]]&lt;br /&gt;
&lt;br /&gt;
gnuplot reads plain text files in table format: one row per line with columns separated by white space. Each row in the table is used to create ''one'' data point on the graph. The simplest file that gnuplot can read contains just two columns of data points,&lt;br /&gt;
 &amp;gt; cat simple.txt&lt;br /&gt;
   0.0  1.1&lt;br /&gt;
   0.1  1.3&lt;br /&gt;
   0.2  1.4&lt;br /&gt;
   0.3  1.9&lt;br /&gt;
&lt;br /&gt;
gnuplot can plot this file directly,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple.txt'  # note the quote marks&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_010.png|400px]]&lt;br /&gt;
&lt;br /&gt;
This turns out to be fairly convenient because it is not very difficult to write code to write files in this format&lt;br /&gt;
&lt;br /&gt;
  // C&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    printf( fp, &amp;quot;%f %f\n&amp;quot;, x[i], y[i] );&lt;br /&gt;
  &lt;br /&gt;
  // C++&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    std::cout&amp;lt;&amp;lt;x[i]&amp;lt;&amp;lt;&amp;quot; &amp;quot;&amp;lt;&amp;lt;y[i]&amp;lt;&amp;lt;std::endl;&lt;br /&gt;
&lt;br /&gt;
When analyzing data, this is often all that is required to see trends. However, if we are going to show out graph to anybody else, we will certainly want to fix it up.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel 'x (arbitrary)'  # arbitrary units on the x-axis&lt;br /&gt;
 gnuplot&amp;gt; set ylabel 'y (arbitrary)'  # arbitrary units on the y-axis&lt;br /&gt;
 gnuplot&amp;gt; set title 'Simple Graph'&lt;br /&gt;
 gnuplot&amp;gt; set xrange[-.1:.4]          # widen xrange to see endpoints&lt;br /&gt;
 gnuplot&amp;gt; set yrange[1:2]             # same for yrange&lt;br /&gt;
 gnuplot&amp;gt; set key left                # move key to left, out of the way&lt;br /&gt;
 gnuplot&amp;gt; replot                      # dont' forget to replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_011.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot can display data points as points (as above), lines, or points connected by lines. This is controlled by setting the &amp;lt;code&amp;gt;style&amp;lt;/code&amp;gt; option for &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data lines&lt;br /&gt;
 gnuplot&amp;gt; rep                   # rep is shorthand for replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data linespoints&lt;br /&gt;
 gnuplot&amp;gt; rep&lt;br /&gt;
&lt;br /&gt;
=====choosing and manipulating data=====&lt;br /&gt;
The data we want to plot may be in a file with multiple columns. By default, gnuplot will read the file and use only the first two columns. The first column is used for the x coordinate, the second column is used for y.&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cat simple2.txt&lt;br /&gt;
 0.0  1.1  2.4  5.4&lt;br /&gt;
 0.1  1.3  2.7  6.3&lt;br /&gt;
 0.2  1.4  2.9  7.5&lt;br /&gt;
 0.3  1.9  3.1  9.1&lt;br /&gt;
&lt;br /&gt;
Plotting this file will give the same graph as the previous file. However, to plot the 3rd column of data, we add the &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple2.txt' using 1:3&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier selects the columns to use in the plot. As expected, the above plot command selects the first and third columns.&lt;br /&gt;
&lt;br /&gt;
;using&lt;br /&gt;
: select columns from&lt;br /&gt;
&lt;br /&gt;
====lines vs. points====&lt;br /&gt;
By default, gnuplot will plot data as ''points''. To change this, we can set the data style to ''lines'' or ''linespoints'' (actually, other styles exist, but are much less common).&lt;br /&gt;
&lt;br /&gt;
==Creating Pictures==&lt;br /&gt;
gnuplot separates the concept of ''creating'' a plot and ''outputting'' a plot. Basically, all of the work required to construct a plot (reading in data points from a file, evaluating functions, etc) is independent of how the plot will be displayed. For example, you may want to the plot to be displayed on the screen, or written to a jpg. gnuplot uses the idea of ''terminals'' to support outputting plots to multiple formats. To output a plot to a jpeg, you tell gnuplot to write to the jpeg terminal type. To output a plot a png, you tell gnuplot to write to the png terminal type. You get the idea.&lt;br /&gt;
&lt;br /&gt;
To change the terminal type, set the &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; option. For example, to create a png, set the terminal type to png.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set terminal png&lt;br /&gt;
&lt;br /&gt;
==Gnuplot Scripts==&lt;br /&gt;
The commands for creation of a gnuplot graph can be assembled as a text file and run as a gnuplot script by&lt;br /&gt;
executing a command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;gnuplot &amp;quot;script_file_name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Gnuplot will execute the commands within the file.  Here, the common use is to set the output terminal to postscript or some other format and viewed by an external viewer, like Okular.  &lt;br /&gt;
&lt;br /&gt;
A second method is to load a file from within gnuplot with the load command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; load &amp;quot;script_file-name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Using this method, additional changes may be made to the graph with the interactive command line.&lt;br /&gt;
&lt;br /&gt;
==Graphical Interfaces==&lt;br /&gt;
A number of graphical user interfaces exist for gnuplot.  A common interface within Linux is &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt;.  The &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt; package can typically be found along with gnuplot and installed in a similar fashion as described above.&lt;br /&gt;
&lt;br /&gt;
Graphical interfaces are categorically frowned upon by this Department and its collaborators.&lt;br /&gt;
&lt;br /&gt;
==Other Reading==&lt;br /&gt;
&lt;br /&gt;
* [http://www-128.ibm.com/developerworks/library/l-gnuplot/ Visualize your data with gnuplot]: an IBM tutorial&lt;br /&gt;
* [http://www.gnuplotting.org/ gnuplotting]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://spplotters.blogspot.com/ spplotters]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://gnuplot-surprising.blogspot.com/ gnuplot surprising]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://linuxgazette.net/168/misc/lg/2_cent_tip__piping_to_gnu_plot_from_c.html]: piping from C to gnuplot&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=480</id>
		<title>Gnuplot</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=480"/>
				<updated>2013-01-22T22:06:45Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Other Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
==Installation==&lt;br /&gt;
If gnuplot is not already installed on your system, you need to install it. The method of install will depend on your OS and distribution. A few common examples are&lt;br /&gt;
&lt;br /&gt;
;Gentoo&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; emerge gnuplot&lt;br /&gt;
&lt;br /&gt;
;Ubuntu&lt;br /&gt;
 &amp;gt; sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Fedora&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; yum install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Debian&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Windows&lt;br /&gt;
: A windows install file can be downloaded from the gnuplot sourceforge page [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. &lt;br /&gt;
&lt;br /&gt;
;Mac OS X&lt;br /&gt;
: First, download XQuartz from [http://xquartz.macosforge.org/landing/ here] and install. Then download the &amp;lt;code&amp;gt;gnuplot-4.6.0.tar.gz&amp;lt;/code&amp;gt; from [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. Now you will just unpack, configure, build and install gnuplot from source.&lt;br /&gt;
  &amp;gt; tar xzf gnuplot-4.6.0.tar.gz&lt;br /&gt;
  &amp;gt; cd gnuplot-4.6.0&lt;br /&gt;
  &amp;gt; ./configure&lt;br /&gt;
  &amp;gt; make&lt;br /&gt;
  &amp;gt; make install     # run as root.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Other&lt;br /&gt;
: Of course, gnuplot can be built from source on any other Unix based machine such as Mac OS X and Linux.&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
Several good tutorial references exist for gnuplot.  &lt;br /&gt;
&lt;br /&gt;
Gnuplot Official Site (Tutorial/User Manual PDF): [http://www.gnuplot.info/ http://www.gnuplot.info/]&lt;br /&gt;
&lt;br /&gt;
Gnuplot Not So Frequently Asked Questions: [http://t16web.lanl.gov/Kawano/gnuplot/index-e.html http://t16web.lanl.gov/Kawano/gnuplot/index-e.html]&lt;br /&gt;
&lt;br /&gt;
The book, Gnuplot in Action: [http://www.manning.com/janert/ http://www.manning.com/janert/]&lt;br /&gt;
 &lt;br /&gt;
===Plotting===&lt;br /&gt;
gnuplot is a program created to plot stuff. You can plot functions or data. There are two commands for plotting, &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; is used to plot 2D functions while &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt; is used to plot 3D functions. &lt;br /&gt;
&lt;br /&gt;
===Plotting Functions===&lt;br /&gt;
The &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command has the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [ function | 'filename' datafile-modifiers ]&lt;br /&gt;
&lt;br /&gt;
gnuplot has great support for all common (and many uncommon) functions. For example, to plot sin(x),&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_001.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is a special variable that gnuplot reconizes as the dependent variable. Multiple functions can be plotted on the same graph, just separate each with a comma&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x), cos(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_002.png|400px]]&lt;br /&gt;
&lt;br /&gt;
We control the what and how our plot is displayed by setting ''options''. Options are set with the &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; command. For example, to set the graph title, we set the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; option to a string containing the title.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set title &amp;quot;Sine and Cosine&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Notice that the graph does not change after you set the title option. gnuplot will not redraw the graph until we either issue another &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command, or tell it to ''replot'' what we previously plotted with the ...&amp;lt;code&amp;gt;replot&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; replot  # redraw the previous plot with new options&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_003.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Other important options include &amp;lt;code&amp;gt;xlabel&amp;lt;/code&amp;gt; (the x-axis label), &amp;lt;code&amp;gt;ylabel&amp;lt;/code&amp;gt; (the y-axis label) and &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; (sets the position of the legend). The legend is located in the top-right corner of the graph by default, which is in the way in the example above. To label the axis and move the key,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &amp;quot;time (s)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set ylabel &amp;quot;current (A)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set key top left&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_004.png|400px]]&lt;br /&gt;
&lt;br /&gt;
By default, gnuplot will &amp;quot;autoscale&amp;quot; the y axis (when plotting data from a file, the x axis is autoscaled too). To set the x and y axis ranges, set the &amp;lt;code&amp;gt;xrange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yrange&amp;lt;/code&amp;gt; options.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; xrange[0:10]&lt;br /&gt;
 gnuplot&amp;gt; yrange[-2:2]&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_005.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can also set the range directly in the plot command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [x=0:10] sin(x)&lt;br /&gt;
&lt;br /&gt;
Autoscaling can always be re-enabled by setting the &amp;lt;code&amp;gt;autoscale&amp;lt;/code&amp;gt; option&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale&lt;br /&gt;
&lt;br /&gt;
or, to enable autoscaling for the x or y axis individually,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale x   # autoscale the x axis&lt;br /&gt;
 gnuplot&amp;gt; set autoscale y   # autoscale the y axis&lt;br /&gt;
&lt;br /&gt;
gnuplot allows aritrarly complex functions to be plotted. These can either be built directly in the &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
&lt;br /&gt;
or you can define a function and plot it&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; f(x) = sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
 gnuplot&amp;gt; plot f(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_006.png|400px]]&lt;br /&gt;
&lt;br /&gt;
====user-defined functions====&lt;br /&gt;
gnuplot allows the user to define arbitrary functions. Function definitions have the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; function_name(arg1, [arg2, ...] ) = expression&lt;br /&gt;
&lt;br /&gt;
In the example above, we defined a function &amp;lt;code&amp;gt;f(x)&amp;lt;/code&amp;gt; that was a function of only one variable. However, we can define function of multiple variables. This can be very handy if we would like to plot a function with a variable parameter. For example, we may want to plot a Gaussian, but allow the center and width to be changed. We could define a Gauss function,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; gauss(sigma, x0, x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
To plot this function for different values of &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt;, we just provide values directly in the plot command&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,0,x), gauss(0.5,1,x), gausss(1.0,1,x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_007.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that, while we used the variable &amp;lt;code&amp;gt;x&amp;lt;\code&amp;gt; in the definition of &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt;, it is not required. More importantly, we can plot a function agains ''any'' of its arguments.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,x,1)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_008.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot also also supports variables. You can set a variable, and then use it in plot commands or even function definitions. For example, we could set the width and position of a Gaussian function through two variables.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; x0 = 1.5&lt;br /&gt;
 gnuplot&amp;gt; sigma = 0.75&lt;br /&gt;
 gnuplot&amp;gt; gauss2(x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
This function will use the values stored in &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; when it is evaluated. Note that the &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; in the function &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt; will '''not''' use the variables. Function argument names will &amp;quot;hide&amp;quot; variable names. In other words, gnuplot variables have ''scope''.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5, 1, x), gauss2(x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_009.png|400px]]&lt;br /&gt;
&lt;br /&gt;
===plotting data from a file===&lt;br /&gt;
&lt;br /&gt;
We often need to plot data that is stored in a file. Typically this has either been generated from a computer model, or collected in an experiment. gnuplot has a very powerful set of utilities for plotting data from a file. The data files used in the examples that follow can be downloaded here.&lt;br /&gt;
&lt;br /&gt;
[[Media:simple.txt|simple.txt]]&lt;br /&gt;
&lt;br /&gt;
gnuplot reads plain text files in table format: one row per line with columns separated by white space. Each row in the table is used to create ''one'' data point on the graph. The simplest file that gnuplot can read contains just two columns of data points,&lt;br /&gt;
 &amp;gt; cat simple.txt&lt;br /&gt;
   0.0  1.1&lt;br /&gt;
   0.1  1.3&lt;br /&gt;
   0.2  1.4&lt;br /&gt;
   0.3  1.9&lt;br /&gt;
&lt;br /&gt;
gnuplot can plot this file directly,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple.txt'  # note the quote marks&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_010.png|400px]]&lt;br /&gt;
&lt;br /&gt;
This turns out to be fairly convenient because it is not very difficult to write code to write files in this format&lt;br /&gt;
&lt;br /&gt;
  // C&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    printf( fp, &amp;quot;%f %f\n&amp;quot;, x[i], y[i] );&lt;br /&gt;
  &lt;br /&gt;
  // C++&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    std::cout&amp;lt;&amp;lt;x[i]&amp;lt;&amp;lt;&amp;quot; &amp;quot;&amp;lt;&amp;lt;y[i]&amp;lt;&amp;lt;std::endl;&lt;br /&gt;
&lt;br /&gt;
When analyzing data, this is often all that is required to see trends. However, if we are going to show out graph to anybody else, we will certainly want to fix it up.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel 'x (arbitrary)'  # arbitrary units on the x-axis&lt;br /&gt;
 gnuplot&amp;gt; set ylabel 'y (arbitrary)'  # arbitrary units on the y-axis&lt;br /&gt;
 gnuplot&amp;gt; set title 'Simple Graph'&lt;br /&gt;
 gnuplot&amp;gt; set xrange[-.1:.4]          # widen xrange to see endpoints&lt;br /&gt;
 gnuplot&amp;gt; set yrange[1:2]             # same for yrange&lt;br /&gt;
 gnuplot&amp;gt; set key left                # move key to left, out of the way&lt;br /&gt;
 gnuplot&amp;gt; replot                      # dont' forget to replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_011.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot can display data points as points (as above), lines, or points connected by lines. This is controlled by setting the &amp;lt;code&amp;gt;style&amp;lt;/code&amp;gt; option for &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data lines&lt;br /&gt;
 gnuplot&amp;gt; rep                   # rep is shorthand for replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data linespoints&lt;br /&gt;
 gnuplot&amp;gt; rep&lt;br /&gt;
&lt;br /&gt;
=====choosing and manipulating data=====&lt;br /&gt;
The data we want to plot may be in a file with multiple columns. By default, gnuplot will read the file and use only the first two columns. The first column is used for the x coordinate, the second column is used for y.&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cat simple2.txt&lt;br /&gt;
 0.0  1.1  2.4  5.4&lt;br /&gt;
 0.1  1.3  2.7  6.3&lt;br /&gt;
 0.2  1.4  2.9  7.5&lt;br /&gt;
 0.3  1.9  3.1  9.1&lt;br /&gt;
&lt;br /&gt;
Plotting this file will give the same graph as the previous file. However, to plot the 3rd column of data, we add the &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple2.txt' using 1:3&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier selects the columns to use in the plot. As expected, the above plot command selects the first and third columns.&lt;br /&gt;
&lt;br /&gt;
;using&lt;br /&gt;
: select columns from&lt;br /&gt;
&lt;br /&gt;
====lines vs. points====&lt;br /&gt;
By default, gnuplot will plot data as ''points''. To change this, we can set the data style to ''lines'' or ''linespoints'' (actually, other styles exist, but are much less common).&lt;br /&gt;
&lt;br /&gt;
==Creating Pictures==&lt;br /&gt;
gnuplot separates the concept of ''creating'' a plot and ''outputting'' a plot. Basically, all of the work required to construct a plot (reading in data points from a file, evaluating functions, etc) is independent of how the plot will be displayed. For example, you may want to the plot to be displayed on the screen, or written to a jpg. gnuplot uses the idea of ''terminals'' to support outputting plots to multiple formats. To output a plot to a jpeg, you tell gnuplot to write to the jpeg terminal type. To output a plot a png, you tell gnuplot to write to the png terminal type. You get the idea.&lt;br /&gt;
&lt;br /&gt;
To change the terminal type, set the &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; option. For example, to create a png, set the terminal type to png.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set terminal png&lt;br /&gt;
&lt;br /&gt;
==Gnuplot Scripts==&lt;br /&gt;
The commands for creation of a gnuplot graph can be assembled as a text file and run as a gnuplot script by&lt;br /&gt;
executing a command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;gnuplot &amp;quot;script_file_name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Gnuplot will execute the commands within the file.  Here, the common use is to set the output terminal to postscript or some other format and viewed by an external viewer, like Okular.  &lt;br /&gt;
&lt;br /&gt;
A second method is to load a file from within gnuplot with the load command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; load &amp;quot;script_file-name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Using this method, additional changes may be made to the graph with the interactive command line.&lt;br /&gt;
&lt;br /&gt;
==Graphical Interfaces==&lt;br /&gt;
A number of graphical user interfaces exist for gnuplot.  A common interface within Linux is &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt;.  The &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt; package can typically be found along with gnuplot and installed in a similar fashion as described above.&lt;br /&gt;
&lt;br /&gt;
Graphical interfaces are categorically frowned upon by this Department and its collaborators.&lt;br /&gt;
&lt;br /&gt;
==Other Reading==&lt;br /&gt;
&lt;br /&gt;
* [http://www-128.ibm.com/developerworks/library/l-gnuplot/ Visualize your data with gnuplot]: an IBM tutorial&lt;br /&gt;
* [http://www.gnuplotting.org/ gnuplotting]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://spplotters.blogspot.com/ spplotters]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://gnuplot-surprising.blogspot.com/ gnuplot surprising]: a blog of gnuplot examples and tips&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=479</id>
		<title>Gnuplot</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Gnuplot&amp;diff=479"/>
				<updated>2013-01-22T22:06:23Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
==Installation==&lt;br /&gt;
If gnuplot is not already installed on your system, you need to install it. The method of install will depend on your OS and distribution. A few common examples are&lt;br /&gt;
&lt;br /&gt;
;Gentoo&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; emerge gnuplot&lt;br /&gt;
&lt;br /&gt;
;Ubuntu&lt;br /&gt;
 &amp;gt; sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Fedora&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; yum install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Debian&lt;br /&gt;
 # must run as root&lt;br /&gt;
 &amp;gt; apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
;Windows&lt;br /&gt;
: A windows install file can be downloaded from the gnuplot sourceforge page [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. &lt;br /&gt;
&lt;br /&gt;
;Mac OS X&lt;br /&gt;
: First, download XQuartz from [http://xquartz.macosforge.org/landing/ here] and install. Then download the &amp;lt;code&amp;gt;gnuplot-4.6.0.tar.gz&amp;lt;/code&amp;gt; from [http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/ here]. Now you will just unpack, configure, build and install gnuplot from source.&lt;br /&gt;
  &amp;gt; tar xzf gnuplot-4.6.0.tar.gz&lt;br /&gt;
  &amp;gt; cd gnuplot-4.6.0&lt;br /&gt;
  &amp;gt; ./configure&lt;br /&gt;
  &amp;gt; make&lt;br /&gt;
  &amp;gt; make install     # run as root.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Other&lt;br /&gt;
: Of course, gnuplot can be built from source on any other Unix based machine such as Mac OS X and Linux.&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
Several good tutorial references exist for gnuplot.  &lt;br /&gt;
&lt;br /&gt;
Gnuplot Official Site (Tutorial/User Manual PDF): [http://www.gnuplot.info/ http://www.gnuplot.info/]&lt;br /&gt;
&lt;br /&gt;
Gnuplot Not So Frequently Asked Questions: [http://t16web.lanl.gov/Kawano/gnuplot/index-e.html http://t16web.lanl.gov/Kawano/gnuplot/index-e.html]&lt;br /&gt;
&lt;br /&gt;
The book, Gnuplot in Action: [http://www.manning.com/janert/ http://www.manning.com/janert/]&lt;br /&gt;
 &lt;br /&gt;
===Plotting===&lt;br /&gt;
gnuplot is a program created to plot stuff. You can plot functions or data. There are two commands for plotting, &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; is used to plot 2D functions while &amp;lt;code&amp;gt;splot&amp;lt;/code&amp;gt; is used to plot 3D functions. &lt;br /&gt;
&lt;br /&gt;
===Plotting Functions===&lt;br /&gt;
The &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command has the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [ function | 'filename' datafile-modifiers ]&lt;br /&gt;
&lt;br /&gt;
gnuplot has great support for all common (and many uncommon) functions. For example, to plot sin(x),&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_001.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is a special variable that gnuplot reconizes as the dependent variable. Multiple functions can be plotted on the same graph, just separate each with a comma&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x), cos(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_002.png|400px]]&lt;br /&gt;
&lt;br /&gt;
We control the what and how our plot is displayed by setting ''options''. Options are set with the &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; command. For example, to set the graph title, we set the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; option to a string containing the title.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set title &amp;quot;Sine and Cosine&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Notice that the graph does not change after you set the title option. gnuplot will not redraw the graph until we either issue another &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command, or tell it to ''replot'' what we previously plotted with the ...&amp;lt;code&amp;gt;replot&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; replot  # redraw the previous plot with new options&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_003.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Other important options include &amp;lt;code&amp;gt;xlabel&amp;lt;/code&amp;gt; (the x-axis label), &amp;lt;code&amp;gt;ylabel&amp;lt;/code&amp;gt; (the y-axis label) and &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; (sets the position of the legend). The legend is located in the top-right corner of the graph by default, which is in the way in the example above. To label the axis and move the key,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &amp;quot;time (s)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set ylabel &amp;quot;current (A)&amp;quot;&lt;br /&gt;
 gnuplot&amp;gt; set key top left&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_004.png|400px]]&lt;br /&gt;
&lt;br /&gt;
By default, gnuplot will &amp;quot;autoscale&amp;quot; the y axis (when plotting data from a file, the x axis is autoscaled too). To set the x and y axis ranges, set the &amp;lt;code&amp;gt;xrange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yrange&amp;lt;/code&amp;gt; options.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; xrange[0:10]&lt;br /&gt;
 gnuplot&amp;gt; yrange[-2:2]&lt;br /&gt;
 gnuplot&amp;gt; replot&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_005.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can also set the range directly in the plot command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot [x=0:10] sin(x)&lt;br /&gt;
&lt;br /&gt;
Autoscaling can always be re-enabled by setting the &amp;lt;code&amp;gt;autoscale&amp;lt;/code&amp;gt; option&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale&lt;br /&gt;
&lt;br /&gt;
or, to enable autoscaling for the x or y axis individually,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set autoscale x   # autoscale the x axis&lt;br /&gt;
 gnuplot&amp;gt; set autoscale y   # autoscale the y axis&lt;br /&gt;
&lt;br /&gt;
gnuplot allows aritrarly complex functions to be plotted. These can either be built directly in the &amp;lt;code&amp;gt;plot&amp;lt;/code&amp;gt; command,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
&lt;br /&gt;
or you can define a function and plot it&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; f(x) = sin(x) + cos(2*x) + 3*sin(4*x)&lt;br /&gt;
 gnuplot&amp;gt; plot f(x)&lt;br /&gt;
&lt;br /&gt;
[[File:gnuplot_tutorial_pic_006.png|400px]]&lt;br /&gt;
&lt;br /&gt;
====user-defined functions====&lt;br /&gt;
gnuplot allows the user to define arbitrary functions. Function definitions have the following form&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; function_name(arg1, [arg2, ...] ) = expression&lt;br /&gt;
&lt;br /&gt;
In the example above, we defined a function &amp;lt;code&amp;gt;f(x)&amp;lt;/code&amp;gt; that was a function of only one variable. However, we can define function of multiple variables. This can be very handy if we would like to plot a function with a variable parameter. For example, we may want to plot a Gaussian, but allow the center and width to be changed. We could define a Gauss function,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; gauss(sigma, x0, x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
To plot this function for different values of &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt;, we just provide values directly in the plot command&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,0,x), gauss(0.5,1,x), gausss(1.0,1,x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_007.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Note that, while we used the variable &amp;lt;code&amp;gt;x&amp;lt;\code&amp;gt; in the definition of &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt;, it is not required. More importantly, we can plot a function agains ''any'' of its arguments.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5,x,1)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_008.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot also also supports variables. You can set a variable, and then use it in plot commands or even function definitions. For example, we could set the width and position of a Gaussian function through two variables.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; x0 = 1.5&lt;br /&gt;
 gnuplot&amp;gt; sigma = 0.75&lt;br /&gt;
 gnuplot&amp;gt; gauss2(x) = exp( - (x - x0)**2 / (2*sigma*sigma))&lt;br /&gt;
&lt;br /&gt;
This function will use the values stored in &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; when it is evaluated. Note that the &amp;lt;code&amp;gt;x0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sigma&amp;lt;/code&amp;gt; in the function &amp;lt;code&amp;gt;gauss&amp;lt;/code&amp;gt; will '''not''' use the variables. Function argument names will &amp;quot;hide&amp;quot; variable names. In other words, gnuplot variables have ''scope''.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot gauss(0.5, 1, x), gauss2(x)&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_009.png|400px]]&lt;br /&gt;
&lt;br /&gt;
===plotting data from a file===&lt;br /&gt;
&lt;br /&gt;
We often need to plot data that is stored in a file. Typically this has either been generated from a computer model, or collected in an experiment. gnuplot has a very powerful set of utilities for plotting data from a file. The data files used in the examples that follow can be downloaded here.&lt;br /&gt;
&lt;br /&gt;
[[Media:simple.txt|simple.txt]]&lt;br /&gt;
&lt;br /&gt;
gnuplot reads plain text files in table format: one row per line with columns separated by white space. Each row in the table is used to create ''one'' data point on the graph. The simplest file that gnuplot can read contains just two columns of data points,&lt;br /&gt;
 &amp;gt; cat simple.txt&lt;br /&gt;
   0.0  1.1&lt;br /&gt;
   0.1  1.3&lt;br /&gt;
   0.2  1.4&lt;br /&gt;
   0.3  1.9&lt;br /&gt;
&lt;br /&gt;
gnuplot can plot this file directly,&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple.txt'  # note the quote marks&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_010.png|400px]]&lt;br /&gt;
&lt;br /&gt;
This turns out to be fairly convenient because it is not very difficult to write code to write files in this format&lt;br /&gt;
&lt;br /&gt;
  // C&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    printf( fp, &amp;quot;%f %f\n&amp;quot;, x[i], y[i] );&lt;br /&gt;
  &lt;br /&gt;
  // C++&lt;br /&gt;
  &lt;br /&gt;
  for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
    std::cout&amp;lt;&amp;lt;x[i]&amp;lt;&amp;lt;&amp;quot; &amp;quot;&amp;lt;&amp;lt;y[i]&amp;lt;&amp;lt;std::endl;&lt;br /&gt;
&lt;br /&gt;
When analyzing data, this is often all that is required to see trends. However, if we are going to show out graph to anybody else, we will certainly want to fix it up.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set xlabel 'x (arbitrary)'  # arbitrary units on the x-axis&lt;br /&gt;
 gnuplot&amp;gt; set ylabel 'y (arbitrary)'  # arbitrary units on the y-axis&lt;br /&gt;
 gnuplot&amp;gt; set title 'Simple Graph'&lt;br /&gt;
 gnuplot&amp;gt; set xrange[-.1:.4]          # widen xrange to see endpoints&lt;br /&gt;
 gnuplot&amp;gt; set yrange[1:2]             # same for yrange&lt;br /&gt;
 gnuplot&amp;gt; set key left                # move key to left, out of the way&lt;br /&gt;
 gnuplot&amp;gt; replot                      # dont' forget to replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:gnuplot_tutorial_pic_011.png|400px]]&lt;br /&gt;
&lt;br /&gt;
gnuplot can display data points as points (as above), lines, or points connected by lines. This is controlled by setting the &amp;lt;code&amp;gt;style&amp;lt;/code&amp;gt; option for &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data lines&lt;br /&gt;
 gnuplot&amp;gt; rep                   # rep is shorthand for replot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set style data linespoints&lt;br /&gt;
 gnuplot&amp;gt; rep&lt;br /&gt;
&lt;br /&gt;
=====choosing and manipulating data=====&lt;br /&gt;
The data we want to plot may be in a file with multiple columns. By default, gnuplot will read the file and use only the first two columns. The first column is used for the x coordinate, the second column is used for y.&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cat simple2.txt&lt;br /&gt;
 0.0  1.1  2.4  5.4&lt;br /&gt;
 0.1  1.3  2.7  6.3&lt;br /&gt;
 0.2  1.4  2.9  7.5&lt;br /&gt;
 0.3  1.9  3.1  9.1&lt;br /&gt;
&lt;br /&gt;
Plotting this file will give the same graph as the previous file. However, to plot the 3rd column of data, we add the &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; plot 'simple2.txt' using 1:3&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;using&amp;lt;/code&amp;gt; modifier selects the columns to use in the plot. As expected, the above plot command selects the first and third columns.&lt;br /&gt;
&lt;br /&gt;
;using&lt;br /&gt;
: select columns from&lt;br /&gt;
&lt;br /&gt;
====lines vs. points====&lt;br /&gt;
By default, gnuplot will plot data as ''points''. To change this, we can set the data style to ''lines'' or ''linespoints'' (actually, other styles exist, but are much less common).&lt;br /&gt;
&lt;br /&gt;
==Creating Pictures==&lt;br /&gt;
gnuplot separates the concept of ''creating'' a plot and ''outputting'' a plot. Basically, all of the work required to construct a plot (reading in data points from a file, evaluating functions, etc) is independent of how the plot will be displayed. For example, you may want to the plot to be displayed on the screen, or written to a jpg. gnuplot uses the idea of ''terminals'' to support outputting plots to multiple formats. To output a plot to a jpeg, you tell gnuplot to write to the jpeg terminal type. To output a plot a png, you tell gnuplot to write to the png terminal type. You get the idea.&lt;br /&gt;
&lt;br /&gt;
To change the terminal type, set the &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; option. For example, to create a png, set the terminal type to png.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; set terminal png&lt;br /&gt;
&lt;br /&gt;
==Gnuplot Scripts==&lt;br /&gt;
The commands for creation of a gnuplot graph can be assembled as a text file and run as a gnuplot script by&lt;br /&gt;
executing a command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;gnuplot &amp;quot;script_file_name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Gnuplot will execute the commands within the file.  Here, the common use is to set the output terminal to postscript or some other format and viewed by an external viewer, like Okular.  &lt;br /&gt;
&lt;br /&gt;
A second method is to load a file from within gnuplot with the load command.&lt;br /&gt;
&lt;br /&gt;
 gnuplot&amp;gt; load &amp;quot;script_file-name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Using this method, additional changes may be made to the graph with the interactive command line.&lt;br /&gt;
&lt;br /&gt;
==Graphical Interfaces==&lt;br /&gt;
A number of graphical user interfaces exist for gnuplot.  A common interface within Linux is &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt;.  The &amp;lt;b&amp;gt;grace&amp;lt;/b&amp;gt; package can typically be found along with gnuplot and installed in a similar fashion as described above.&lt;br /&gt;
&lt;br /&gt;
Graphical interfaces are categorically frowned upon by this Department and its collaborators.&lt;br /&gt;
&lt;br /&gt;
==Other Reading==&lt;br /&gt;
&lt;br /&gt;
* {{Official website|http://www.gnuplot.info/}}&lt;br /&gt;
* {{cite book|author=Lee Phillips|title=gnuplot Cookbook|isbn=978-1849517249|publisher=Packt Publishing|year=2012}} &lt;br /&gt;
* {{SourceForge|gnuplot}}&lt;br /&gt;
* [http://www-128.ibm.com/developerworks/library/l-gnuplot/ Visualize your data with gnuplot]: an IBM tutorial&lt;br /&gt;
* [http://www.gnuplotting.org/ gnuplotting]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://spplotters.blogspot.com/ spplotters]: a blog of gnuplot examples and tips&lt;br /&gt;
* [http://gnuplot-surprising.blogspot.com/ gnuplot surprising]: a blog of gnuplot examples and tips&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=478</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=478"/>
				<updated>2013-01-22T20:02:48Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Using LaTeX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Jack Maseberg&lt;br /&gt;
&lt;br /&gt;
Guide to getting LaTeX running on your computer (Windows, Mac, or Linux)!&lt;br /&gt;
&lt;br /&gt;
1) Install TeX Live:&amp;lt;br /&amp;gt;&lt;br /&gt;
Windows: download and run the install-tl.zip file from here (http://www.tug.org/texlive/acquire-netinstall.html)&amp;lt;br /&amp;gt;&lt;br /&gt;
Macs: (http://www.tug.org/mactex/2011/)&amp;lt;br /&amp;gt;&lt;br /&gt;
Linux (Ubuntu): use synaptic to install the texlive package&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the net installers look deceptively small is size, but the texlive folder on my windows machine is about 2.5 GB in size, so make sure you have HD space before you start!&lt;br /&gt;
&lt;br /&gt;
2) Install a LaTeX editor. I use the cross-platform Texmaker (http://www.xm1math.net/texmaker/)&lt;br /&gt;
&lt;br /&gt;
3) Install REVTeX https://authors.aps.org/revtex4/&lt;br /&gt;
&lt;br /&gt;
It may be useful to refer to this site: [http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html] when installing the custom styles and bibliography formats.&lt;br /&gt;
&lt;br /&gt;
4) Get this example template: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)&lt;br /&gt;
&lt;br /&gt;
5) Configure Texmaker: go to toolbar, choose options/quick build/User, add the following text&lt;br /&gt;
&lt;br /&gt;
latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps&lt;br /&gt;
&lt;br /&gt;
== Using LaTeX ==&lt;br /&gt;
&lt;br /&gt;
LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX&lt;br /&gt;
&lt;br /&gt;
LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=477</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=LaTeX&amp;diff=477"/>
				<updated>2013-01-22T20:02:33Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: /* Using LaTeX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Jack Maseberg&lt;br /&gt;
&lt;br /&gt;
Guide to getting LaTeX running on your computer (Windows, Mac, or Linux)!&lt;br /&gt;
&lt;br /&gt;
1) Install TeX Live:&amp;lt;br /&amp;gt;&lt;br /&gt;
Windows: download and run the install-tl.zip file from here (http://www.tug.org/texlive/acquire-netinstall.html)&amp;lt;br /&amp;gt;&lt;br /&gt;
Macs: (http://www.tug.org/mactex/2011/)&amp;lt;br /&amp;gt;&lt;br /&gt;
Linux (Ubuntu): use synaptic to install the texlive package&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the net installers look deceptively small is size, but the texlive folder on my windows machine is about 2.5 GB in size, so make sure you have HD space before you start!&lt;br /&gt;
&lt;br /&gt;
2) Install a LaTeX editor. I use the cross-platform Texmaker (http://www.xm1math.net/texmaker/)&lt;br /&gt;
&lt;br /&gt;
3) Install REVTeX https://authors.aps.org/revtex4/&lt;br /&gt;
&lt;br /&gt;
It may be useful to refer to this site: [http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html] when installing the custom styles and bibliography formats.&lt;br /&gt;
&lt;br /&gt;
4) Get this example template: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)&lt;br /&gt;
&lt;br /&gt;
5) Configure Texmaker: go to toolbar, choose options/quick build/User, add the following text&lt;br /&gt;
&lt;br /&gt;
latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps&lt;br /&gt;
&lt;br /&gt;
== Using LaTeX ==&lt;br /&gt;
&lt;br /&gt;
LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX&lt;br /&gt;
LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=386</id>
		<title>Common C, C++, FORTRAN Libraries</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=386"/>
				<updated>2012-09-15T23:48:55Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of common libraries for computational physics and numerical analysis.  Here are a few links for tutorials and information for installation of commonly-used tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Special Functions ==&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/gsl/ GNU Scientific Library(GSL)]&lt;br /&gt;
&lt;br /&gt;
The GSL also has calls for C and C++ for a variety of linear algebra functions found in BLAS and other packages. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linear Algebra ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BLAS under Linux ===&lt;br /&gt;
&lt;br /&gt;
[http://www.seehuhn.de/pages/linear Linear Algebra in Linux (BLAS/LAPACK)]&lt;br /&gt;
&lt;br /&gt;
[http://www.linuxquestions.org/questions/linux-software-2/blas-installation-using-yum-doesnt-install-header-files-887814/ Setting up BLAS in Linux (yum-based systems)]&lt;br /&gt;
&lt;br /&gt;
[http://vibrationdata.wordpress.com/2011/11/04/matrix-multiplication-in-blas/ Matrix Multiplication with BLAS and CBLAS]&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/gsl/manual/html_node/BLAS-Examples.html GSL BLAS Examples (such as matrix multiply)]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=385</id>
		<title>Common C, C++, FORTRAN Libraries</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=385"/>
				<updated>2012-09-15T23:47:14Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of common libraries for computational physics and numerical analysis.  Here are a few links for tutorials and information for installation of commonly-used tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Special Functions ==&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/gsl/ GNU Scientific Library(GSL)]&lt;br /&gt;
&lt;br /&gt;
The GSL also has calls for C and C++ for a variety of linear algebra functions found in BLAS and other packages. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linear Algebra ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BLAS under Linux ===&lt;br /&gt;
&lt;br /&gt;
[http://www.seehuhn.de/pages/linear Linear Algebra in Linux (BLAS/LAPACK)]&lt;br /&gt;
&lt;br /&gt;
[http://www.linuxquestions.org/questions/linux-software-2/blas-installation-using-yum-doesnt-install-header-files-887814/ Setting up BLAS in Linux (yum-based systems)]&lt;br /&gt;
&lt;br /&gt;
[http://vibrationdata.wordpress.com/2011/11/04/matrix-multiplication-in-blas/ Matrix Multiplication with BLAS and CBLAS]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=384</id>
		<title>Common C, C++, FORTRAN Libraries</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=384"/>
				<updated>2012-09-15T23:33:15Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of common libraries for computational physics and numerical analysis.  Here are a few links for tutorials and information for installation of commonly-used tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linear Algebra ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BLAS under Linux ===&lt;br /&gt;
&lt;br /&gt;
[http://www.seehuhn.de/pages/linear Linear Algebra in Linux (BLAS/LAPACK)]&lt;br /&gt;
&lt;br /&gt;
[http://www.linuxquestions.org/questions/linux-software-2/blas-installation-using-yum-doesnt-install-header-files-887814/ Setting up BLAS in Linux (yum-based systems)]&lt;br /&gt;
&lt;br /&gt;
[http://vibrationdata.wordpress.com/2011/11/04/matrix-multiplication-in-blas/ Matrix Multiplication with BLAS and CBLAS]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=383</id>
		<title>Common C, C++, FORTRAN Libraries</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=383"/>
				<updated>2012-09-15T22:37:49Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of common libraries for computational physics and numerical analysis.  Here are a few links for tutorials and information for installation of commonly-used tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linear Algebra ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BLAS under Linux ===&lt;br /&gt;
&lt;br /&gt;
[http://www.seehuhn.de/pages/linear Linear Algebra in Linux (BLAS/LAPACK)]&lt;br /&gt;
&lt;br /&gt;
[http://www.linuxquestions.org/questions/linux-software-2/blas-installation-using-yum-doesnt-install-header-files-887814/ Setting up BLAS in Linux (yum-based systems)]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=382</id>
		<title>Common C, C++, FORTRAN Libraries</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Common_C,_C%2B%2B,_FORTRAN_Libraries&amp;diff=382"/>
				<updated>2012-09-15T22:37:39Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: Created page with &amp;quot;There are a number of common libraries for computational physics and numerical analysis.  Here are a few links for tutorials and information for installation of commonly-used too…&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of common libraries for computational physics and numerical analysis.  Here are a few links for tutorials and information for installation of commonly-used tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linear Algebra ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==- BLAS under Linux ===&lt;br /&gt;
&lt;br /&gt;
[http://www.seehuhn.de/pages/linear Linear Algebra in Linux (BLAS/LAPACK)]&lt;br /&gt;
&lt;br /&gt;
[http://www.linuxquestions.org/questions/linux-software-2/blas-installation-using-yum-doesnt-install-header-files-887814/ Setting up BLAS in Linux (yum-based systems)]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	<entry>
		<id>http://fourier.fhsu.edu/index.php?title=Linux&amp;diff=381</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="http://fourier.fhsu.edu/index.php?title=Linux&amp;diff=381"/>
				<updated>2012-09-15T22:33:13Z</updated>
		
		<summary type="html">&lt;p&gt;Rthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Gnuplot]]&lt;br /&gt;
&lt;br /&gt;
[[Common C, C++, FORTRAN Libraries]]&lt;/div&gt;</summary>
		<author><name>Rthomas</name></author>	</entry>

	</feed>