Closed josephmarturano closed 5 years ago
Today the Plots team released v0.26.1 for Plots.jl (link here). So now we can at least produce an interactive output using the plotly() backend to Plots, like so:
using Plots
plotly()
plot(randn(100))
When I run the above with Plots.jl 0.26.1, and then Weave to html:
using Weave; weave("C:/Julia/test_interactive_weave.jl", out_path=:doc, doctype="md2html")
I do get an interactive html output. So I am closing this issue. Thanks.
I am getting issues too. When I put in the following:
using Plots
plotly()
plot(rand(10))
And then output via weave using:
weave((“doctest.jmd”), out_path=:pwd,doctype=“md2html”)
I get this:
Error:
[ Info: Weaving chunk 1 from line 7
┌ Warning: ERROR: BoundsError occurred, including output in Weaved document
└ @ Weave ~/.julia/packages/Weave/UOxmI/src/run.jl:243
[ Info: Report weaved to test.html
[ Info: Weaving chunk 1 from line 7
┌ Warning: ERROR: BoundsError occurred, including output in Weaved document
└ @ Weave ~/.julia/packages/Weave/UOxmI/src/run.jl:243
[ Info: Report weaved to test.html
With plotlyjs():
I am seeing the same issues reported here (for both plotly()
and plotlyjs()
). The linked thread indicated that an update to Julia 1.2 fixed the issue however I am on Julia 1.5.3.
Here are the installed package versions:
[717857b8] DSP v0.6.8
[682c06a0] JSON v0.21.1
[9b87118b] PackageCompiler v1.2.3
[58dd65bb] Plotly v0.3.0
[a03496cd] PlotlyBase v0.4.2
[f0f68f2c] PlotlyJS v0.14.0
[91a5bcdd] Plots v1.8.1
[44d3d7a6] Weave v0.10.6
Any help or insight very much appreciated!
Yeah it actually did stop happening for a while, I realize it was because of an update, but after I upgraded to Julia 1.5 it came up again. (Not sure if it is due to the Julia version).
I'm getting the same thing
[58dd65bb] Plotly v0.4.0
[f0f68f2c] PlotlyJS v0.14.1
[91a5bcdd] Plots v1.16.2
[44d3d7a6] Weave v0.10.9
julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, haswell)
Environment:
JULIA_EDITOR = atom -a
JULIA_NUM_THREADS = 4
I'm getting the same thing as well,
(testplotlydocs) pkg> status
Project testplotlydocs v0.1.0
Status `~/projects/testplotlydocs/Project.toml`
[e30172f5] Documenter v0.27.14
[f0f68f2c] PlotlyJS v0.18.8
[f3b207a7] StatsPlots v0.14.33
[44d3d7a6] Weave v0.10.10
julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.5.0)
CPU: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Getting this during weave process of this code:
using StatsPlots
plotlyjs()
plot(rand(100))
┌ Info: Weaving chunk 3 from line 0
└ progress = 0.6666666666666666
┌ Warning: ERROR: UndefVarError occurred, including output in Weaved document
└ @ Weave ~/.julia/packages/Weave/lQPaO/src/run.jl:224
It works in the notebook in vscode, but not when trying to weave
the resulting html document showing, same result happens for markdown output as well.
First, thank you for this great package. It has already helped me communicate my results using Julia. I have no doubt this package is improving scientific communication around the world.
In my view, what would really bring Weave reports to the next level are embedded interactive plots. Such a report is beyond a traditional document editor with static plots (e.g., MS Word). I have been trying to embed interactive plots within a Weave HTML report, and read issues #47 and #186. But so far I have been unsuccessful. I tried searching online but have not found examples or instructions for how to generate an interactive HTML output, so I thought to open this issue and ask for help.
I am using a Windows 7 machine and VS Code with the Julia extension (v.0.12.0). Here are my attempts:
Attempt 1 In the editor, I entered and ran the following:
I save the file as "test_interactive_weave.jl". Then in the VS Code Julia console, I entered the following Weave command:
using Weave; weave("C:/Julia/test_interactive_weave.jl", out_path=:doc, doctype="md2html")
But in the rendered HTML file, I see the code but instead of a plot, I see red text that reads:
Attempt 2 Next, I tried changing "plotly()" to "plotlyjs()", but after entering the same Weave command, in the rendered HTML output I see the following red text:
Attempt 3 So then I tried changing the doctype to "pandoctohtml", i.e., the following Weave command:
using Weave; weave("C:/Julia/test_interactive_weave.jl", out_path=:doc, doctype="pandoc2html")
When I use plotly() as the backend and pandoctohtml, I see the "got :html" error as before:
Attempt 4 And when I use plotlyjs() and pandoctohtml, I see the same "data not defined" error:
Package status The following is the output of
using Pkg; Pkg.status()
I would appreciate any thoughts or help. Thank you for your time.