Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/optim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Simonovsky <simonovm@imagine.enpc.fr>2015-02-10 22:31:43 +0300
committerMartin Simonovsky <simonovm@imagine.enpc.fr>2015-03-11 18:49:22 +0300
commitf3316cf14fd46378795dde93b6ae1bfa4aa8e3d1 (patch)
treee52af6403f98282371d1fac91beb832f34eb25b0
parentb01f9a59b7c965e36dc2dc3335e2ec7a170c84e5 (diff)
added option to disable showing of plots while still saving plots in file
-rw-r--r--Logger.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/Logger.lua b/Logger.lua
index e4b97e7..5618884 100644
--- a/Logger.lua
+++ b/Logger.lua
@@ -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)