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_points.gnuplot | |
| download | thesis-cb070b2d3f2b6e241e3be1b7e0eeb90fc755255f.tar.gz | |
Diffstat (limited to 'plot_speed_error_points.gnuplot')
| -rw-r--r-- | plot_speed_error_points.gnuplot | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plot_speed_error_points.gnuplot b/plot_speed_error_points.gnuplot new file mode 100644 index 0000000..d3d9d96 --- /dev/null +++ b/plot_speed_error_points.gnuplot | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | # Usage: | ||
| 2 | # gnuplot -e "before='original.csv'; after='compensated.csv'; out='speed_error.svg'" plot_speed_error_points.gnuplot | ||
| 3 | # | ||
| 4 | # CSV columns expected from diagnostics.c: | ||
| 5 | # 1 t, 9 v_err_abs, 14 is_work, 15 is_traverse | ||
| 6 | |||
| 7 | if (!exists("before")) before = "original.csv" | ||
| 8 | if (!exists("after")) after = "compensated.csv" | ||
| 9 | if (!exists("out")) out = "speed_error.svg" | ||
| 10 | |||
| 11 | set encoding utf8 | ||
| 12 | set datafile separator comma | ||
| 13 | set terminal svg size 1400,700 dynamic enhanced dashed font "DejaVu Sans,12" | ||
| 14 | set output out | ||
| 15 | |||
| 16 | set title "Ошибка скорости до и после компенсации" | ||
| 17 | set xlabel "t, с" | ||
| 18 | set ylabel "|e_v|, мм/с" | ||
| 19 | set grid | ||
| 20 | set key outside right center | ||
| 21 | |||
| 22 | # Цвет различает набор данных: | ||
| 23 | # синий — до компенсации; | ||
| 24 | # красный — после компенсации. | ||
| 25 | # Тип точки различает тип участка: | ||
| 26 | # круглая точка — рабочий участок; | ||
| 27 | # крестик — нерабочий участок G0. | ||
| 28 | set style line 1 lc rgb "#1f77b4" pt 7 ps 0.25 | ||
| 29 | set style line 2 lc rgb "#1f77b4" pt 2 ps 0.30 | ||
| 30 | set style line 3 lc rgb "#d62728" pt 7 ps 0.25 | ||
| 31 | set style line 4 lc rgb "#d62728" pt 2 ps 0.30 | ||
| 32 | |||
| 33 | set xrange [0:10] | ||
| 34 | |||
| 35 | plot before every ::1 using 1:(column(14) > 0.5 ? column(9) : 1/0) with points ls 1 title "до, рабочие", \ | ||
| 36 | before every ::1 using 1:(column(15) > 0.5 ? column(9) : 1/0) with points ls 2 title "до, G0", \ | ||
| 37 | after every ::1 using 1:(column(14) > 0.5 ? column(9) : 1/0) with points ls 3 title "после, рабочие", \ | ||
| 38 | after every ::1 using 1:(column(15) > 0.5 ? column(9) : 1/0) with points ls 4 title "после, G0" | ||
| 39 | |||
| 40 | set output | ||
