plotly_data for Surface; improve add_backend(:plotlyjs)

This commit is contained in:
Thomas Breloff 2016-09-09 22:37:55 -04:00
parent 2bde412fa3
commit 17afa11723
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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