From 084dd630597f32c718b5406d3f22987896f93c7a Mon Sep 17 00:00:00 2001 From: Jarvist Moore Frost Date: Mon, 21 Sep 2020 21:02:08 +0100 Subject: [PATCH] Add check for Pluto.jl interactive notebook. --- src/Gnuplot.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gnuplot.jl b/src/Gnuplot.jl index 9e741d4..55a2581 100644 --- a/src/Gnuplot.jl +++ b/src/Gnuplot.jl @@ -236,11 +236,12 @@ const sessions = OrderedDict{Symbol, Session}() const options = Options() function __init__() - # Check whether we are running in a IJulia or Juno session. + # Check whether we are running in an IJulia, Juno or Pluto session. # (copied from Gaston.jl). options.gpviewer = !( ((isdefined(Main, :IJulia) && Main.IJulia.inited) || - (isdefined(Main, :Juno) && Main.Juno.isactive())) + (isdefined(Main, :Juno) && Main.Juno.isactive()) || + (isdefined(Main, :PlutoRunner)) ) ) end