diff options
| author | 2026-11-11 22:28:13 +0000 | |
|---|---|---|
| committer | 2026-11-11 22:47:34 +0000 | |
| commit | cb070b2d3f2b6e241e3be1b7e0eeb90fc755255f (patch) | |
| tree | c7d90c0abe9533c87d51b5196871846855efa1ba /plot_speed_error.gnuplot | |
| download | thesis-master.tar.gz | |
Diffstat (limited to 'plot_speed_error.gnuplot')
| -rw-r--r-- | plot_speed_error.gnuplot | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/plot_speed_error.gnuplot b/plot_speed_error.gnuplot new file mode 100644 index 0000000..28932c8 --- /dev/null +++ b/plot_speed_error.gnuplot | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | # -*- Gnuplot -*- | ||
| 2 | |||
| 3 | # Usage: | ||
| 4 | # gnuplot -e "before='original.csv'; after='compensated.csv'; out='speed_error.svg'" plot_speed_error.gnuplot | ||
| 5 | # | ||
| 6 | # CSV columns expected from diagnostics.c: | ||
| 7 | # 1 t, 9 v_err_abs, 14 is_work, 15 is_traverse | ||
| 8 | |||
| 9 | if (!exists("before")) before = "original.csv" | ||
| 10 | if (!exists("after")) after = "compensated.csv" | ||
| 11 | if (!exists("out")) out = "res/speed_error.tex" | ||
| 12 | |||
| 13 | set encoding utf8 | ||
| 14 | set datafile separator comma | ||
| 15 | set term cairolatex pdf input \ | ||
| 16 | blacktext notransparent nocrop \ | ||
| 17 | size 16.5cm,10.25cm \ | ||
| 18 | noheader | ||
| 19 | set output out | ||
| 20 | |||
| 21 | # set size ratio 0.66 | ||
| 22 | # set lmargin at screen 0.1 | ||
| 23 | # set rmargin at screen 0.9 | ||
| 24 | # set bmargin at screen 0.1 | ||
| 25 | # set tmargin at screen 0.9 | ||
| 26 | |||
| 27 | set format y "\\text{%.0f}" | ||
| 28 | set format x "\\text{%.0f}" | ||
| 29 | set x2label "Время, $t$ (с)" | ||
| 30 | set y2label "Ошибка скорости, $|e_v|$ (мм/с)" offset 1,0 | ||
| 31 | set grid | ||
| 32 | set key center bmargin horizontal maxrows 1 | ||
| 33 | set key width -4 | ||
| 34 | set key samplen 1.5 # Shortens the little colored line sample | ||
| 35 | set key spacing 1.2 # Adds slight vertical space between the two rows | ||
| 36 | set key Left # Left-aligns the text descriptions | ||
| 37 | set key reverse # Swaps the sample line and text position (Line comes AFTER text) | ||
| 38 | |||
| 39 | # Цвет различает набор данных, тип линии различает тип участка: | ||
| 40 | # сплошная — рабочий участок; | ||
| 41 | # штриховая — нерабочий участок G0. | ||
| 42 | set style line 1 lc rgb "#1f77b4" lw 1.7 dt 1 | ||
| 43 | set style line 3 lc rgb "#d62728" lw 2 dt 1 | ||
| 44 | |||
| 45 | set yrange [-5:55] | ||
| 46 | set xrange [0:8] | ||
| 47 | |||
| 48 | plot before every ::1 using 1:9 with lines ls 1 title "Исходный", \ | ||
| 49 | after every ::1 using 1:9 with lines ls 3 title "Уточнённый" | ||
| 50 | |||
| 51 | set output | ||
