Skip to content

Commit d9832a2

Browse files
committed
Allow to get a figure without raising it.
1 parent f74e8c1 commit d9832a2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gnuplot.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,10 +803,13 @@ function gnuplot.figprint(fname)
803803
writeToCurrent('set term ' .. _gptable[_gptable.current].term .. ' ' .. _gptable.current .. '\n')
804804
end
805805

806-
function gnuplot.figure(n)
806+
function gnuplot.figure(n, config)
807+
config = config or {}
807808
local gp = getfigure(n)
808809
writeToCurrent('set term ' .. _gptable[_gptable.current].term .. ' ' .. _gptable.current .. '\n')
809-
writeToCurrent('raise')
810+
if not config.noraise then
811+
writeToCurrent('raise')
812+
end
810813
return _gptable.current
811814
end
812815

0 commit comments

Comments
 (0)