diff --git a/src/backends.jl b/src/backends.jl index 68aaca71..e698263c 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -367,10 +367,10 @@ is_marker_supported(::GRBackend, shape::Shape) = true function _initialize_backend(pkg::PlotlyBackend) try @eval Main begin - import ORCA + import PlotlyBase end catch - @info "For saving to png with the Plotly backend ORCA has to be installed." + @info "For saving to png with the Plotly backend PlotlyBase has to be installed." end end @@ -488,7 +488,7 @@ const _pgfplots_scale = [:identity, :ln, :log2, :log10] function _initialize_backend(pkg::PlotlyJSBackend) @eval Main begin - import PlotlyJS, ORCA + import PlotlyJS export PlotlyJS end end diff --git a/src/backends/orca.jl b/src/backends/orca.jl deleted file mode 100644 index 733e25a9..00000000 --- a/src/backends/orca.jl +++ /dev/null @@ -1,23 +0,0 @@ -function plotlybase_syncplot(plt::Plot) - plt.o = ORCA.PlotlyBase.Plot() - traces = ORCA.PlotlyBase.GenericTrace[] - for series_dict in plotly_series(plt) - plotly_type = pop!(series_dict, :type) - push!(traces, ORCA.PlotlyBase.GenericTrace(plotly_type; series_dict...)) - end - ORCA.PlotlyBase.addtraces!(plt.o, traces...) - layout = plotly_layout(plt) - w, h = plt[:size] - ORCA.PlotlyBase.relayout!(plt.o, layout, width = w, height = h) - return plt.o -end - -for (mime, fmt) in ( - "application/pdf" => "pdf", - "image/png" => "png", - "image/svg+xml" => "svg", - "image/eps" => "eps", -) - @eval _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{PlotlyBackend}) = - ORCA.PlotlyBase.savefig(io, plotlybase_syncplot(plt), format = $fmt) -end diff --git a/src/init.jl b/src/init.jl index 3f731395..b46e5ddc 100644 --- a/src/init.jl +++ b/src/init.jl @@ -41,8 +41,8 @@ function __init__() include(fn) end - @require ORCA = "47be7bcc-f1a6-5447-8b36-7eeeff7534fd" begin - fn = joinpath(@__DIR__, "backends", "orca.jl") + @require PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5" begin + fn = joinpath(@__DIR__, "backends", "plotlybase.jl") include(fn) end