Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createData()
- file = io.open("data.txt", "w")
- for i=1,10 do
- file:write(i .. " " .. (i * i) .. "\n")
- end
- file:close()
- return
- end
- function generatePlotScript()
- file = io.open("test.gnuplot", "w")
- file:write([[plot "data.txt" using 1:2 with points, x * x]])
- file:close()
- end
- function plot()
- os.execute([[cmd /K "C:\Program Files (x86)\gnuplot\bin\gnuplot.exe" test.gnuplot --persist]])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement