aboutsummaryrefslogtreecommitdiff
path: root/motion.gnuplot
diff options
context:
space:
mode:
authorLibravatar Martin Michalec <martin@michalec.dev>2026-11-11 22:28:13 +0000
committerLibravatar Martin Michalec <martin@michalec.dev>2026-11-11 22:47:34 +0000
commitcb070b2d3f2b6e241e3be1b7e0eeb90fc755255f (patch)
treec7d90c0abe9533c87d51b5196871846855efa1ba /motion.gnuplot
downloadthesis-master.tar.gz
publishHEADmaster
Diffstat (limited to 'motion.gnuplot')
-rw-r--r--motion.gnuplot149
1 files changed, 149 insertions, 0 deletions
diff --git a/motion.gnuplot b/motion.gnuplot
new file mode 100644
index 0000000..05b92c3
--- /dev/null
+++ b/motion.gnuplot
@@ -0,0 +1,149 @@
1# -*- Gnuplot -*-
2set datafile separator comma
3set key outside
4set grid
5set term pngcairo size 1400,900 enhanced font "Arial,12"
6
7csv = "motion.csv"
8
9# ------------------------------------------------------------
10# 1. Траектория XY
11# ------------------------------------------------------------
12
13set output "plot_xy.png"
14set title "XY trajectory"
15set xlabel "X, mm"
16set ylabel "Y, mm"
17set size ratio -1
18
19plot csv using 3:4 with lines title "trajectory"
20
21# ------------------------------------------------------------
22# 2. Скорость вдоль траектории
23# ------------------------------------------------------------
24
25set output "plot_velocity.png"
26set title "Path velocity"
27set xlabel "t, s"
28set ylabel "v, mm/s"
29set autoscale
30set size noratio
31
32plot csv using 1:5 with lines title "v"
33
34# ------------------------------------------------------------
35# 3. Тангенциальное ускорение
36# ------------------------------------------------------------
37
38set output "plot_tangential_acceleration.png"
39set title "Tangential acceleration"
40set xlabel "t, s"
41set ylabel "a_t, mm/s^2"
42
43plot csv using 1:6 with lines title "a_t"
44
45# ------------------------------------------------------------
46# 4. Нормальное ускорение
47# ------------------------------------------------------------
48
49set output "plot_normal_acceleration.png"
50set title "Normal acceleration"
51set xlabel "t, s"
52set ylabel "a_n, mm/s^2"
53
54plot csv using 1:9 with lines title "a_n"
55
56# ------------------------------------------------------------
57# 5. Полное ускорение
58# ------------------------------------------------------------
59
60set output "plot_acceleration_abs.png"
61set title "Acceleration magnitude"
62set xlabel "t, s"
63set ylabel "|a|, mm/s^2"
64
65plot csv using 1:10 with lines title "|a|"
66
67# ------------------------------------------------------------
68# 6. Тангенциальный рывок
69# ------------------------------------------------------------
70
71set output "plot_tangential_jerk.png"
72set title "Tangential jerk"
73set xlabel "t, s"
74set ylabel "j_t, mm/s^3"
75
76plot csv using 1:7 with lines title "j_t"
77
78# ------------------------------------------------------------
79# 7. Полный векторный рывок
80# ------------------------------------------------------------
81
82set output "plot_jerk_abs.png"
83set title "Jerk magnitude"
84set xlabel "t, s"
85set ylabel "|j|, mm/s^3"
86
87plot csv using 1:11 with lines title "|j|"
88
89# ------------------------------------------------------------
90# 8. Осевые скорости
91# ------------------------------------------------------------
92
93set output "plot_axis_velocity.png"
94set title "Axis velocities"
95set xlabel "t, s"
96set ylabel "velocity, mm/s"
97
98plot csv using 1:12 with lines title "v_x", \
99 csv using 1:13 with lines title "v_y"
100
101# ------------------------------------------------------------
102# 9. Осевые ускорения
103# ------------------------------------------------------------
104
105set output "plot_axis_acceleration.png"
106set title "Axis accelerations"
107set xlabel "t, s"
108set ylabel "acceleration, mm/s^2"
109
110plot csv using 1:14 with lines title "a_x", \
111 csv using 1:15 with lines title "a_y"
112
113# ------------------------------------------------------------
114# 10. Осевые рывки
115# ------------------------------------------------------------
116
117set output "plot_axis_jerk.png"
118set title "Axis jerks"
119set xlabel "t, s"
120set ylabel "jerk, mm/s^3"
121
122plot csv using 1:16 with lines title "j_x", \
123 csv using 1:17 with lines title "j_y"
124
125# ------------------------------------------------------------
126# 11. Состояние лазера
127# ------------------------------------------------------------
128
129set output "plot_laser.png"
130set title "Laser state"
131set xlabel "t, s"
132set ylabel "laser_on"
133
134set yrange [-0.2:1.2]
135
136plot csv using 1:22 with steps title "laser_on"
137
138# ------------------------------------------------------------
139# 12. Индекс блока
140# ------------------------------------------------------------
141
142set output "plot_block_index.png"
143set title "Motion block index"
144set xlabel "t, s"
145set ylabel "block_index"
146
147set autoscale y
148
149plot csv using 1:23 with steps title "block_index"