From cd770f70c0ebe769eb9b38b523958b390f228bcd Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Wed, 8 Aug 2018 09:24:37 +0200 Subject: [PATCH 1/2] fix merge conflict relicts --- src/output.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/output.jl b/src/output.jl index 27592eb4..085876fb 100644 --- a/src/output.jl +++ b/src/output.jl @@ -254,7 +254,6 @@ end # end # # html_output_format("svg") -<<<<<<< HEAD # --------------------------------------------------------- @@ -279,5 +278,3 @@ function showjuno(io::IO, m, plt) plt[:dpi] = dpi plt[:thickness_scaling] = thickness_scaling end -======= ->>>>>>> 85b3aefd677c8c3adf6797cb2d85c1249cf631b8 From 0548793bfd2c6929717f083b9f31d54c4cb22ba1 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Wed, 8 Aug 2018 09:28:30 +0200 Subject: [PATCH 2/2] remove Juno requires code --- src/init.jl | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/src/init.jl b/src/init.jl index c1e95168..53f5898b 100644 --- a/src/init.jl +++ b/src/init.jl @@ -67,57 +67,4 @@ function __init__() ENV["MPLBACKEND"] = "Agg" end end - - # --------------------------------------------------------- - # Atom PlotPane - # --------------------------------------------------------- - @require Juno = "e5e0dc1b-0480-54bc-9374-aad01c23163d" begin - import Hiccup, Media - - if Juno.isactive() - Media.media(Plot, Media.Plot) - - function Juno.render(e::Juno.Editor, plt::Plot) - Juno.render(e, nothing) - end - - if get(ENV, "PLOTS_USE_ATOM_PLOTPANE", true) in (true, 1, "1", "true", "yes") - function Juno.render(pane::Juno.PlotPane, plt::Plot) - # temporarily overwrite size to be Atom.plotsize - sz = plt[:size] - dpi = plt[:dpi] - thickness_scaling = plt[:thickness_scaling] - jsize = Juno.plotsize() - jsize[1] == 0 && (jsize[1] = 400) - jsize[2] == 0 && (jsize[2] = 500) - - scale = minimum(jsize[i] / sz[i] for i in 1:2) - plt[:size] = (s * scale for s in sz) - plt[:dpi] = Plots.DPI - plt[:thickness_scaling] *= scale - Juno.render(pane, HTML(stringmime(MIME("text/html"), plt))) - plt[:size] = sz - plt[:dpi] = dpi - plt[:thickness_scaling] = thickness_scaling - end - # special handling for PlotlyJS - function Juno.render(pane::Juno.PlotPane, plt::Plot{PlotlyJSBackend}) - display(Plots.PlotsDisplay(), plt) - end - else - function Juno.render(pane::Juno.PlotPane, plt::Plot) - display(Plots.PlotsDisplay(), plt) - s = "PlotPane turned off. Unset ENV[\"PLOTS_USE_ATOM_PLOTPANE\"] and restart Julia to enable it." - Juno.render(pane, HTML(s)) - end - end - - # special handling for plotly... use PlotsDisplay - function Juno.render(pane::Juno.PlotPane, plt::Plot{PlotlyBackend}) - display(Plots.PlotsDisplay(), plt) - s = "PlotPane turned off. The plotly backend cannot render in the PlotPane due to javascript issues. Plotlyjs is similar to plotly and is compatible with the plot pane." - Juno.render(pane, HTML(s)) - end - end - end end