diff options
author | Martin Simonovsky <simonovm@imagine.enpc.fr> | 2015-02-10 22:31:43 +0300 |
---|---|---|
committer | Martin Simonovsky <simonovm@imagine.enpc.fr> | 2015-03-11 18:49:22 +0300 |
commit | f3316cf14fd46378795dde93b6ae1bfa4aa8e3d1 (patch) | |
tree | e52af6403f98282371d1fac91beb832f34eb25b0 | |
parent | b01f9a59b7c965e36dc2dc3335e2ec7a170c84e5 (diff) |
added option to disable showing of plots while still saving plots in file
-rw-r--r-- | Logger.lua | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -53,6 +53,7 @@ function Logger:__init(filename, timestamp) self.names = {} self.idx = {} self.figure = nil + self.showPlot = true end function Logger:setNames(names) @@ -148,10 +149,12 @@ function Logger:plot(...) end end if plotit then - self.figure = gnuplot.figure(self.figure) - gnuplot.plot(plots) - gnuplot.grid('on') - gnuplot.title('<Logger::' .. self.name .. '>') + if self.showPlot then + self.figure = gnuplot.figure(self.figure) + gnuplot.plot(plots) + gnuplot.grid('on') + gnuplot.title('<Logger::' .. self.name .. '>') + end if self.epsfile then os.execute('rm -f "' .. self.epsfile .. '"') local epsfig = gnuplot.epsfigure(self.epsfile) |