diff --git a/src/Plots.jl b/src/Plots.jl
index 8c4fd730..6f40334f 100644
--- a/src/Plots.jl
+++ b/src/Plots.jl
@@ -21,7 +21,11 @@ using Requires
if isfile(joinpath(@__DIR__, "..", "deps", "deps.jl"))
include(joinpath(@__DIR__, "..", "deps", "deps.jl"))
else
- error("Plots not build, please run Pkg.build(\"Plots\")")
+ # This is a bit dirty, but I don't really see why anyone should be forced
+ # to build Plots, while it will just include exactly the below line
+ # as long as now ENV["PLOTS_HOST_DEPENDENCY_LOCAL"] = "true" is given
+ # If the above env is set + plotly_local_file_path = "", it will warn in the __init__ functtion
+ const plotly_local_file_path = ""
end
export
diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl
index 60d01669..5c12ba4b 100644
--- a/src/backends/plotly.jl
+++ b/src/backends/plotly.jl
@@ -862,26 +862,24 @@ plotly_series_json(plt::Plot) = JSON.json(plotly_series(plt))
const ijulia_initialized = Ref(false)
function html_head(plt::Plot{PlotlyBackend})
- if isfile(plotly_local_file_path) && isijulia() && !ijulia_initialized[]
- js_code = read(plotly_local_file_path, String)
- # borrowed from https://github.com/plotly/plotly.py/blob/2594076e29584ede2d09f2aa40a8a195b3f3fc66/plotly/offline/offline.py#L64-L71 c/o @spencerlyon2
- js_script = """
-
- """
- # if we're in IJulia call setupnotebook to load js and css
- display("text/html", js_script)
+ """)
ijulia_initialized[] = true
end
- local_file = ("file://" * plotly_local_file_path)
- jsfilename = use_local_dependencies[] ? local_file : plotly_remote_file_path
- ""
+ # IJulia just needs one initialization
+ isijulia() && return ""
+ return ""
end
function html_body(plt::Plot{PlotlyBackend}, style = nothing)