-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.toml
More file actions
182 lines (149 loc) · 4.01 KB
/
Copy pathplot.toml
File metadata and controls
182 lines (149 loc) · 4.01 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# =============================================================================
# plot.toml — Plot configuration showcase
# Demonstrates multi-figure, multi-axis layout, different plot types, sharex/sharey/figsize
# Usage: ucap mon -c examples/plot.toml # Real-time monitor with GUI
# =============================================================================
rw_freq = 200
[backend]
name = 'mock'
[backend.mock]
sigma = 2.0
[save]
enable = true
dir = 'data/plot_demo'
save_figure = true
[plot]
show = true
# =============================================================================
# Figure 1: 2×2 subplot layout, multiple plot types
# =============================================================================
[[plot.figures]]
name = 'Mixed Plot Types'
axes = [
['ax_plot', 'ax_stem'],
['ax_scatter', 'ax_plot2'],
]
sharex = 'col'
sharey = false
figsize = [12, 8]
layout = 'constrained'
# =============================================================================
# Figure 2: Single column, three rows, shared x-axis
# =============================================================================
[[plot.figures]]
name = 'Comparison View'
axes = [['ax_speed'], ['ax_current'], ['ax_position']]
sharex = 'all'
figsize = [10, 6]
# =============================================================================
# Figure 3: Simple multi-value variable comparison
# =============================================================================
[[plot.figures]]
name = 'Multi-value Array'
axes = [['ax_array']]
sharex = false
# =============================================================================
# Axis Configuration
# =============================================================================
[plot.axes.ax_plot.kwargs]
ylabel = 'Sine Wave'
xlabel = 'Time (s)'
[plot.axes.ax_stem.kwargs]
ylabel = 'Stem Values'
[plot.axes.ax_scatter.kwargs]
ylabel = 'Scatter'
[plot.axes.ax_plot2.kwargs]
ylabel = 'Cosine'
xlabel = 'Time (s)'
[plot.axes.ax_speed.kwargs]
ylabel = 'Speed (RPM)'
[plot.axes.ax_current.kwargs]
ylabel = 'Current (A)'
[plot.axes.ax_position.kwargs]
ylabel = 'Position (rad)'
xlabel = 'Time (s)'
[plot.axes.ax_array.kwargs]
ylabel = 'Array Elements'
xlabel = 'Sample Index'
# =============================================================================
# pre_vars: Seed initial values (set write values for variables in mock mode)
# =============================================================================
[[pre_vars]]
name = 'sine'
address = 0x20000010
format = '<f'
value = 0.0
[[pre_vars]]
name = 'cosine'
address = 0x20000014
format = '<f'
value = 1.0
[[pre_vars]]
name = 'speed'
address = 0x20000020
format = '<f'
value = 1500.0
[[pre_vars]]
name = 'current'
address = 0x20000024
format = '<f'
value = 2.5
[[pre_vars]]
name = 'position'
address = 0x20000028
format = '<f'
value = 0.0
[[pre_vars]]
name = 'phase'
address = 0x2000002C
format = '<f'
value = 1.57
[[pre_vars]]
name = 'triaxial'
address = 0x20000030
format = '<hhh'
value = [0, 0, 0]
# =============================================================================
# vars
# =============================================================================
# --- Scalar, regular plot ---
[[vars]]
name = 'sine'
address = 0x20000010
format = '<f'
plot = { axis = 'ax_plot' }
# --- Scalar, stem type ---
[[vars]]
name = 'cosine'
address = 0x20000014
format = '<f'
plot = { axis = 'ax_stem', type = 'stem' }
# --- Scalar, scatter type ---
[[vars]]
name = 'speed'
address = 0x20000020
format = '<f'
plot = { axis = 'ax_scatter', type = 'scatter' }
# --- Scalar, second figure axis ---
[[vars]]
name = 'current'
address = 0x20000024
format = '<f'
plot = { axis = 'ax_current' }
[[vars]]
name = 'position'
address = 0x20000028
format = '<f'
plot = { axis = 'ax_position' }
# --- Scalar, sharing ax_plot2 on first figure ---
[[vars]]
name = 'phase'
address = 0x2000002C
format = '<f'
plot = { axis = 'ax_plot2' }
# --- Multi-value (no struct), auto-plots three lines ---
[[vars]]
name = 'triaxial'
address = 0x20000030
format = '<hhh'
plot = { axis = 'ax_array' }