exercises:2014_uzh_molsim:gnuplot
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exercise:mm_uzh:gnuplot [2014/04/24 17:12] – talirz | exercises:2014_uzh_molsim:gnuplot [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 11: | Line 11: | ||
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 42: | Line 42: | ||
- | Finally, we want to use Gnuplot's fitting functionality. | + | 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. In Gnuplot, this would be achieved by: | We want to fit a function $f(x)=ax^2$ to this data set. In Gnuplot, this would be achieved by: | ||
Line 60: | Line 60: | ||
</ | </ | ||
+ | Finally, once you have figured out which commands you need to create the plot you want, it is a good idea to write these commands to a file, say '' | ||
+ | <code bash> | ||
+ | gnuplot script.gp | ||
+ | gnuplot | ||
+ | load ' | ||
+ | </ | ||
+ | This makes it very quick and easy to change details in the plot at a later point in time. | ||
+ | Proficient gnuplot users will often start by writing the file, run it through gnuplot and then adjust the remaining details. | ||
exercises/2014_uzh_molsim/gnuplot.1398359570.txt.gz · Last modified: 2020/08/21 10:14 (external edit)