diff options
author | Soumith Chintala <soumith@gmail.com> | 2016-09-15 23:36:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-15 23:36:27 +0300 |
commit | 66a6ece7e5288514b1bfa23b8be0b22f8230c70a (patch) | |
tree | aa38e3589b7789b55948bcd462d4ad26869c8fd2 | |
parent | b812d2a381162bed9f0df26cab8abb4015f47471 (diff) | |
parent | c208ae8f70e13b2b70fc1f037a79b92e5979a352 (diff) |
Merge pull request #132 from codeAC29/master
Prevent displaying of plots and documentation for it
-rw-r--r-- | Logger.lua | 8 | ||||
-rw-r--r-- | doc/logger.md | 6 |
2 files changed, 12 insertions, 2 deletions
@@ -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)`. |