-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathplot.lua
More file actions
23 lines (20 loc) · 715 Bytes
/
plot.lua
File metadata and controls
23 lines (20 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local lapp = require 'pl.lapp'
local nc = require 'nc'
local plotter = require('nc.utils')["plotter"]
local opt = lapp [[
Generating plot from the csv
Options
--single-run Generate plot for current csv and exit
--path-to-csv (default "output/plot.csv") Path to the input csv
--file-only Do not create windows
--output-path (default "figure/") Folder where to output graph
--refresh-time (default 1) Plot frequency
]]
-- The infinite plotting loop
while true do
pcall(plotter.plot, opt)
sys.sleep(opt.refresh_time)
if opt.single_run then
break
end
end