From 805fbe2276fded958e0aa64464ab8e0596f089b0 Mon Sep 17 00:00:00 2001 From: Giorgio Calderone Date: Wed, 25 Mar 2020 18:58:20 +0100 Subject: [PATCH] Bugfix --- src/Gnuplot.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Gnuplot.jl b/src/Gnuplot.jl index dc4d538..36f5468 100644 --- a/src/Gnuplot.jl +++ b/src/Gnuplot.jl @@ -352,7 +352,11 @@ function GPSession(sid::Symbol) pin, pout, perr, proc, chan) sessions[sid] = out - # Set window title + for l in options.init + writeread(out, l) + end + + # Set window title (if not already set) term = writeread(out, "print GPVAL_TERM")[1] if term in ("aqua", "x11", "qt", "wxt") opts = writeread(out, "print GPVAL_TERMOPTIONS")[1] @@ -360,9 +364,6 @@ function GPSession(sid::Symbol) writeread(out, "set term $term $opts title 'Gnuplot.jl: $(out.sid)'") end end - for l in options.init - writeread(out, l) - end return out end