aboutsummaryrefslogtreecommitdiffstats
path: root/206/plots.gp
diff options
context:
space:
mode:
Diffstat (limited to '206/plots.gp')
-rw-r--r--206/plots.gp38
1 files changed, 38 insertions, 0 deletions
diff --git a/206/plots.gp b/206/plots.gp
new file mode 100644
index 0000000..5460021
--- /dev/null
+++ b/206/plots.gp
@@ -0,0 +1,38 @@
+set term pngcairo size 1000, 800
+set grid
+
+f1(x) = a1*x+b1
+fit f1(x) 'ex1.plot' using 1:2:3 yerr via a1, b1
+f2(x) = a2 * x
+fit f2(x) 'ex2.plot' using 1:2 via a2
+
+set output 'ex1.png'
+set title "Зависимость времени прохода волны от расстояния"
+set xlabel "L, м"
+set ylabel "t, мкc"
+set key top left
+
+set xrange[0:0.7]
+
+set label sprintf("A = %.4g\n B =%.4g", a1 / 10e6, b1 / 10e6) at graph 0.2, 0.9 front boxed
+plot 'ex1.plot' using 1:2:3 with yerrorbars notitle lc 0 pt 1 lw 2, \
+ f1(x) title "t(L)" lc rgb "red"
+
+
+set output 'ex2.png'
+set title "Зависимость скорости от корня из температуры"
+set xlabel "T^{1/2}, K^{1/2}"
+set ylabel "v, м/c"
+set key top left
+
+unset xrange
+unset label
+set label sprintf("A = %.4g", a2) at graph 0.2, 0.9 front boxed
+plot 'ex2.plot' using 1:2 notitle lc 0 pt 1 lw 2, \
+ f2(x) title "v(T^{1/2})" lc rgb "red"
+
+
+set output 'ex2_0.png'
+set title "Зависимость скорости от корня из температуры (проход через 0)"
+set xrange[0:19]
+replot