gnuplot, then you will be prompted with version information like
G N U P L O T
Version 5.2 patchlevel 2 last modified 2017-11-01
Copyright (C) 1986-1993, 1998, 2004, 2007-2017
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type set to 'wxt'
gnuplot>
If you want to install it in you USB-flash Linux System, type:sudo apt-get install gnuplot-x11 sudo apt-get install gnuplot-qt x11 or qt.ssh -X ukko).gnuplot/usr/local/bin/gnuplot5/usr/bin/gnuplot or simply gnuplotgnuplot> prompt as follows,gnuplot> plot cos(x)gnuplot> plot sin(x)gnuplot> set angles degrees; plot [x=-180:180] [-1:1] sin(x)
gnuplot> plot exp(x**2)gnuplot> plot [x=0:2] [0:20] exp(x**2)
-----------------------
Time(min) [N2O5] (M)
-----------------------
0 0.0165
10 0.0124
20 0.0093
30 0.0071
40 0.0053
50 0.0039
60 0.0029
-----------------------
Save the data entries above into a file named N2O5.txt by cat >> N2O5.txt with your mouse to copy and paste the numbers, and finally supply ^D as EOF to write out the file.gnuplot> set terminal wxt enhanced; set xlabel "Time (min)"; set ylabel "[N_2O_5] (mol{/Symbol \327}L^{-1})"; plot 'N2O5.txt'{/Symbol \327} stands for the ⋅ (dot) in the PostScript Symbol ListN2O5_plot.gplt with the GNUPlot commands above, one per line:
#!/usr/bin/gnuplot --persist
set terminal wxt enhanced
set xlabel "Time (min)"
set ylabel "[N_2O_5] (mol{/Symbol \327}L^{-1})"
plot 'N2O5.txt' # Note that tilde (~) will NOT ALWAYS work as your or anyone's $HOME inside GNUPlot script!
# end of code
|
chmod +x N2O5_plot.gplt ./N2O5_plot.gplt under shell prompt.~) will NOT ALWAYS work inside GNUPlot script and therefore, it is necessary to specify the filename in the form of '/home/class/u1234567/folder/N2O5.txt' instead of '~u1234567/folder/N2O5.txt' .'~/folder/N2O5.txt' WILL WORK because tilde ~ is followed immediately by the slash / gnuplot> set terminal png enhanced; set output 'N2O5.png'; set xlabel "Time (min)"; set ylabel "[N_2O_5] (mol{/Symbol \327}L^{-1})"; plot 'N2O5.txt'
eog N2O5.png & eog under gnuplot using shell escape technique with !,gnuplot> !eog N2O5.png &
If you want to use the legacy xv for your own linux system to view the pictures, just fetch it to your USB flash by FileZilla, or type:
scp uXXXXXX@ukko.life.nctu.edu.tw:/usr/local/bin/xv /usr/local/bin/
and enter your password at ukko. Do not forget to change its mode before you can run it:
chmod +x /usr/local/bin/xv
Then view the graphic file under the shell prompt with xv N2O5.png &
N2O5_plotpng.gplt :
#!/usr/bin/gnuplot
set terminal png enhanced
set output 'N2O5_plot.png'
set xlabel "Time (min)"
set ylabel "[N_2O_5] (mol{/Symbol \327}L^{-1})"
plot 'N2O5.txt' # Note that tilde (~) will NOT ALWAYS work as your or anyone's $HOME inside GNUPlot script!
# end of code
|
chmod +x N2O5_plotpng.gplt N2O5_plot.png will be generated in the current folder after you run ./N2O5_plotpng.gplt gnuplot> fit m*x+b 'N2O5_ln.txt' using 1:2 via m,bgnuplot> stats 'N2O5_ln.txt'gnuplot> stats 'N2O5_ln.txt' name "GAMMA" (save output to variable GAMMA for later use)Linear Model: y = -0.0289 x - 4.097 Slope: -0.0289 +- 0.0002205 Intercept: -4.097 +- 0.007951 Correlation: r = -0.9999 Sum xy: -1123should give consistent results with the
fit command.gnuplot> plot [x=0:70] -0.0288989*x-4.09728, 'N2O5_ln.txt'
gnuplot> set term wxt enh; set label 1 sprintf("{/Symbol g} = %6.4f",GAMMA_correlation) at graph 0.2, graph 0.85; set xlabel "Time (min)"; set ylabel "ln[N_2O_5]"; plot [x=0:70] -0.0288989*x-4.09728, "N2O5_ln.txt" using 1:2 linecolor 7 linewidth 3 pointtype 20 pointsize 1
test to show figures of wxt style and qt style list.gnuplot> set term png enh; set output 'line_fit.png'; set label 1 sprintf("{/Symbol g} = %6.4f",GAMMA_correlation) at graph 0.2, graph 0.85; set xlabel "Time (min)"; set ylabel "ln[N_2O_5]"; plot [x=0:70] -0.0288989*x-4.09728, "N2O5_ln.txt" linecolor 7 linewidth 3 pointtype 20 pointsize 1

------------------------------- m wavelength(Å) Name ------------------------------- 3 6562.10 Hα 4 4860.74 Hβ 5 4340.10 Hγ 6 4101.2 Hδ 7 3968.1 Hε -------------------------------Since you already knew the Rydberg equation:

------------------------ Volume Redox Potential (mL) (Volt) ------------------------ 5 0.062 15 0.085 20 0.107 22 0.123 23 0.138 23.5 0.146 23.8 0.161 24 0.174 24.1 0.183 24.2 0.194 24.3 0.233 24.4 0.316 24.5 0.34 24.6 0.351 24.7 0.358 25 0.373 25.5 0.385 26 0.396 28 0.426 ------------------------Plot of Titration Curve



set key off
set border 3
set xtics nomirror
set ytics nomirror
set tics nomirror
set grid linestyle 12
set label at 10,0.1 "1st dir"
set label 2 at 20,0.1 "2nd dir"
set key at 15,0.7 on
set grid back linestyle 0 linecolor rgb '#ff0000'
set format y "%4.3f"
replot