Comments updated
This commit is contained in:
parent
5b858670d6
commit
e264b27119
@ -742,8 +742,10 @@ end
|
|||||||
# ╰───────────────────────────────────────────────────────────────────╯
|
# ╰───────────────────────────────────────────────────────────────────╯
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
function enableExportThroughShow()
|
function enableExportThroughShow()
|
||||||
return (isdefined(Main, :IJulia) && Main.IJulia.inited) ||
|
# Trick to check whether we are running in a IJulia or Juno
|
||||||
(isdefined(Main, :Juno) && Main.Juno.isactive())
|
# session. Copied from Gaston.jl.
|
||||||
|
return ((isdefined(Main, :IJulia) && Main.IJulia.inited) ||
|
||||||
|
(isdefined(Main, :Juno) && Main.Juno.isactive()))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -756,8 +758,8 @@ function reset(gp::Session)
|
|||||||
gpexec(gp, "set output")
|
gpexec(gp, "set output")
|
||||||
gpexec(gp, "reset session")
|
gpexec(gp, "reset session")
|
||||||
|
|
||||||
# When running in IJulia or Juno set the unknown terminal
|
# When the `show()` method is enabled ignore options.term and set
|
||||||
# (trick copied from Gaston.jl)
|
# the unknown terminal
|
||||||
if enableExportThroughShow()
|
if enableExportThroughShow()
|
||||||
gpexec(gp, "set term unknown")
|
gpexec(gp, "set term unknown")
|
||||||
else
|
else
|
||||||
@ -772,6 +774,10 @@ function reset(gp::Session)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Note: the reason to keep Options.term and .init separate are:
|
||||||
|
# - .term can be overriden by enableExportThroughShow()
|
||||||
|
# - .init is dumped in scripts, while .term is not
|
||||||
add_cmd.(Ref(gp), options.init)
|
add_cmd.(Ref(gp), options.init)
|
||||||
return nothing
|
return nothing
|
||||||
end
|
end
|
||||||
|
|||||||
@ -245,4 +245,8 @@ Gnuplot.quitall()
|
|||||||
"splot x7, v, (u<0.5) ? -1 : sinc(x7,v) notitle",
|
"splot x7, v, (u<0.5) ? -1 : sinc(x7,v) notitle",
|
||||||
"splot x8, v, (u<0.5) ? -1 : sinc(x8,v) notitle",
|
"splot x8, v, (u<0.5) ? -1 : sinc(x8,v) notitle",
|
||||||
"splot x9, v, (u<0.5) ? -1 : sinc(x9,v) notitle")
|
"splot x9, v, (u<0.5) ? -1 : sinc(x9,v) notitle")
|
||||||
|
|
||||||
|
|
||||||
|
@gp randn(10^6) randn(10^6)
|
||||||
|
|
||||||
Gnuplot.quitall()
|
Gnuplot.quitall()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user