Open StefanPofahl opened 1 year ago
In case you're still looking for a way to export a stand-alone HTML file, this is what I use:
julia> using PlotlyJS
julia> savefig(Plot([scatter(x=1:10, y=randn(10))], Layout(hovermode="closest")), "/data/p.html"); run(`sed -i /data/p.html -e '/mathjax/d'`); run(`sed -i /data/p.html -e 's|https://cdn.plot.ly|.|'`);
The sed
commands aren't needed, but I use them so that HTML file doesn't require any network requests and loads a local copy of the javascript library.
Thanks a lot, I will try :-)
I am also looking for standalone export.
It's nearly possible with PlotlyBase.to_html
.
By setting the kwarg include_plotlyjs="directory"
, the html script tag is changed to <script src="plotly.min.js"></script>
(same for mathjax kwarg). We only have to provide the javascript file ourselves.
It would be convenient to have an option include_plotlyjs="download"
to download and interpolate the javascript into the HTML file for offline standalone usage.
Describe the bug A clear and concise description of what the bug is.
I can not export a stand-alone / off-line-ready html-figure. It is not clear, how to use the parameter
include_plotlyjs
correctly. See also: https://github.com/JuliaPlots/PlotlyJS.jl/issues/366Version info
Please provide the following:
output of julia command
versioninfo()
Output running the following in Julia 0.7 or greater:
using Pkg; pkg"status"
(if you are on Julia 0.6 or earlier runPkg.status()
)