From 17afa11723c3b7381242571214eac266ee3964d8 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Fri, 9 Sep 2016 22:37:55 -0400 Subject: [PATCH] plotly_data for Surface; improve add_backend(:plotlyjs) --- src/backends/plotly.jl | 1 + src/backends/plotlyjs.jl | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 94cd1f9c..e8d2bbeb 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -338,6 +338,7 @@ function plotly_close_shapes(x, y) end plotly_data(v) = collect(v) +plotly_data(surf::Surface) = surf.surf plotly_data{R<:Rational}(v::AbstractArray{R}) = float(v) # get a dictionary representing the series params (d is the Plots-dict, d_out is the Plotly-dict) diff --git a/src/backends/plotlyjs.jl b/src/backends/plotlyjs.jl index 6a8ed518..75631154 100644 --- a/src/backends/plotlyjs.jl +++ b/src/backends/plotlyjs.jl @@ -13,10 +13,12 @@ const _plotlyjs_scale = _plotly_scale function add_backend(::PlotlyJSBackend) if !is_installed("PlotlyJS") Pkg.add("PlotlyJS") - @eval import Blink - Blink.AtomShell.install() + end + if !is_installed("Rsvg") Pkg.add("Rsvg") end + @eval import Blink + Blink.AtomShell.install() end