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