diff --git a/src/backends.jl b/src/backends.jl index 9bcba334..143a929e 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -296,9 +296,6 @@ end _initialize_backend(pkg::GRBackend) = nothing -_initialize_backend(pkg::PlotlyBackend) = nothing - - # ------------------------------------------------------------------------------ # gr @@ -357,6 +354,16 @@ is_marker_supported(::GRBackend, shape::Shape) = true # ------------------------------------------------------------------------------ # plotly +function _initialize_backend(pkg::PlotlyBackend) + try + @eval Main begin + import ORCA + end + catch + @info "For saving to png with the Plotly backend ORCA has to be installed." + end +end + const _plotly_attr = merge_with_base_supported([ :annotations, :background_color_legend, :background_color_inside, :background_color_outside, @@ -708,7 +715,7 @@ const _pgfplotsx_attr = merge_with_base_supported([ const _pgfplotsx_seriestype = [:path, :scatter, :straightline, :path3d, :scatter3d, :surface, :wireframe, - :heatmap, :contour, :contour3d, + :heatmap, :contour, :contour3d, :shape, :steppre, :stepmid, :steppost, :ysticks, :xsticks] const _pgfplotsx_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot] diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 4fcb334f..aad9aac1 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -26,7 +26,6 @@ const plotly_remote_file_path = "https://cdn.plot.ly/plotly-latest.min.js" # end using UUIDs -push!(_initialized_backends, :plotly) # ---------------------------------------------------------------- const _plotly_legend_pos = KW(