exercises:2014_uzh_molsim:gnuplot
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
exercise:mm_uzh:gnuplot [2014/04/24 17:09] – talirz | exercise:mm_uzh:gnuplot [2014/05/01 07:54] – talirz | ||
---|---|---|---|
Line 7: | Line 7: | ||
<note tip>You are free to choose a different plotting program for your analysis ([[http:// | <note tip>You are free to choose a different plotting program for your analysis ([[http:// | ||
- | '' | + | '' |
<code bash> | <code bash> | ||
plot sin(x) | plot sin(x) | ||
splot sin(x)*sin(y) | splot sin(x)*sin(y) | ||
- | plot ' | + | plot ' |
replot ' | replot ' | ||
- | set ylabel | + | set xlabel |
set xrange [0:10] | set xrange [0:10] | ||
replot | replot | ||
Line 33: | Line 33: | ||
</ | </ | ||
- | Now we need to save the graph in order to be able to use . This is done as follows | + | Later you will want to save your graphs |
<code bash> | <code bash> | ||
set terminal png # we want to create a .png image | set terminal png # we want to create a .png image | ||
Line 44: | Line 44: | ||
Finally, we want to use Gnuplot' | Finally, we want to use Gnuplot' | ||
Say, we have a data set '' | Say, we have a data set '' | ||
- | We want to fit a function $f(x)=ax^2$ to this data set. Then we do: | + | We want to fit a function $f(x)=ax^2$ to this data set. In Gnuplot, this would be achieved by: |
<code bash> | <code bash> | ||
f(x) = a*x*x # Define function to be fitted | f(x) = a*x*x # Define function to be fitted | ||
Line 54: | Line 54: | ||
< | < | ||
- | - Create a second plot, this time of temperature versus time. | + | - Create a second plot, this time of temperature versus |
- Label axes of the plot with appropriate units. | - Label axes of the plot with appropriate units. | ||
- Use Gnuplot' | - Use Gnuplot' |
exercises/2014_uzh_molsim/gnuplot.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1