Open clintonTE opened 5 years ago
Nevermind, I see Gadfly doesn't work with this :(
For posterity: As a work around, one can use the Images, FileIO, and ImageMagick (Windows) packages to open images saved by Gadfly as follows:
draw(PNG("ExcessReturns.png",9inch, 7inch),p)
im = load("ExcessReturns.png")
display(im)
@tlnagy is working on bringin Gadfly support back in: https://github.com/mpastell/Weave.jl/pull/163
Thank you! That's great news.
I think #163 is baked and ready to go, but I would appreciate some extra users to take it for a spin and make sure I didn't miss anything obvious. @ClintonTE could you checkout that PR and let me know how it behaves?
On Mon, Jan 28, 2019, 23:26 Clinton Tepper <notifications@github.com wrote:
Thank you! That's great news.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mpastell/Weave.jl/issues/167#issuecomment-458434783, or mute the thread https://github.com/notifications/unsubscribe-auth/ABlaL8tSGa3fye5iQTmsD-M4OE-FXHDkks5vH_ekgaJpZM4aVAaH .
Using the new PR- There is a new and rather bizarre issue. Starting from a new instance of Julia, the first time I run the code it opens the image (but not the rest of the html) in a new tab. Meanwhile the rendered html code does not include the image. When I run the code again, it generates the html correctly without the aberrant behavior. Restarting Julia then reproduces the issue.
If it helps the command I am running is:
weave("JuliaSoln.md", informat="markdown", out_path=:pwd, doctype="md2html")
I haven't had time to reproduce this, but I vaguely remember this happening. I'm not sure why this would be happening. Do you have your using Gadfly
statement and plot
statement inside the same code block?
I just tested this myself (Julia 1.1 on Windows 10) and the PR works for me without any errors. So I don't have the same problem that @clintonTE has.
I have merged #163 after testing it on Linux as well (no problems for me on Ubuntu either). Thanks for the effort @tlnagy ! I will leave this issue open to track @clintonTE's problem. It would be could to know whether it's a problem with Weave or Gadfly.
Cool, thanks @mpastell and @tlnagy! @tlnagy , the using Gadfly
is in the same code block as plot. Also, the plot is wrapped in a function, if that affects anything.
I am also being unable to display Gadfly images. It runs, it shows the plot but it does not put it on the html.
Can you paste a MWE here?
I don't know what you are meaning by a MWE but here is my "code":
hw2.jmd:
```julia; echo = false
using Gadfly
TEXT
plot(y = rand(100))
I run on julia:
`weave("hw2.jmd", out_path=:pwd)`
The command run without errors, display me the plot as if I had just written the plot command on the julia REPL, but there is no image in the HTML.
This is the HTML code for where the plot should be:
plot(y = rand(100))
I don't have any experience using julia's Weave so it might as well be my fault. Am I missing something?
Still same issue after 1 year. Gadfly version 1.3.1, Weave version 0.10.6, Julia version 1.5.2 on Win10.
I can't seem to get Gadfly graphs to render within the markdown document. I've tried passing the plot to outside the function, and several different ways to display. The image displays fine in atom\Juno and when I save it to a file.