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:
authorSoumith Chintala <soumith@gmail.com>2016-09-15 23:36:27 +0300
committerGitHub <noreply@github.com>2016-09-15 23:36:27 +0300
commit66a6ece7e5288514b1bfa23b8be0b22f8230c70a (patch)
treeaa38e3589b7789b55948bcd462d4ad26869c8fd2
parentb812d2a381162bed9f0df26cab8abb4015f47471 (diff)
parentc208ae8f70e13b2b70fc1f037a79b92e5979a352 (diff)
Merge pull request #132 from codeAC29/master
Prevent displaying of plots and documentation for it
-rw-r--r--Logger.lua8
-rw-r--r--doc/logger.md6
2 files changed, 12 insertions, 2 deletions
diff --git a/Logger.lua b/Logger.lua
index 48915ef..31928ec 100644
--- a/Logger.lua
+++ b/Logger.lua
@@ -124,8 +124,12 @@ function Logger:style(symbols)
return self
end
-function Logger:setlogscale(value)
- self.logscale = value
+function Logger:setlogscale(state)
+ self.logscale = state
+end
+
+function Logger:display(state)
+ self.showPlot = state
end
function Logger:plot(...)
diff --git a/doc/logger.md b/doc/logger.md
index b7797d2..bef8ba3 100644
--- a/doc/logger.md
+++ b/doc/logger.md
@@ -71,3 +71,9 @@ logger:plot()
![Logging plot](logger_plot.png)
If we'd like an interactive visualisation, we can put the `logger:plot()` instruction within the `for` loop, and the chart will be updated at every iteration.
+
+In case we'd like to prevent `gnuplot` to display the plots, we can set the option `logger:display(false)`.
+In this way, plots will be saved but not displayed.
+To restore the normal behaviour, use `logger:display(true)`.
+
+We can set a logarithmic *y* axis with `logger:setlogscale(true)` and reset it with `logger:setlogscale(false)`.