diff options
author | Ivo Danihelka <danihelka@google.com> | 2015-10-12 17:03:23 +0300 |
---|---|---|
committer | Ivo Danihelka <danihelka@google.com> | 2015-10-12 17:03:23 +0300 |
commit | d9832a2644dcf936b6c1da89778931291133cc30 (patch) | |
tree | 71e5db5355972ac9d12877b4473e43e1c466be6f | |
parent | f74e8c1dad1326d72878692fd8a25d2a5bb2740d (diff) |
Allow to get a figure without raising it.
-rw-r--r-- | gnuplot.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gnuplot.lua b/gnuplot.lua index 0532f55..22f82e6 100644 --- a/gnuplot.lua +++ b/gnuplot.lua @@ -803,10 +803,13 @@ function gnuplot.figprint(fname) writeToCurrent('set term ' .. _gptable[_gptable.current].term .. ' ' .. _gptable.current .. '\n') end -function gnuplot.figure(n) +function gnuplot.figure(n, config) + config = config or {} local gp = getfigure(n) writeToCurrent('set term ' .. _gptable[_gptable.current].term .. ' ' .. _gptable.current .. '\n') - writeToCurrent('raise') + if not config.noraise then + writeToCurrent('raise') + end return _gptable.current end |