JunoLab / Weave.jl

Scientific reports/literate programming for Julia
http://weavejl.mpastell.com
MIT License
827 stars 95 forks source link

plotly #47

Open sam81 opened 8 years ago

sam81 commented 8 years ago

it would be nice to have support for plotly plots generated with plotlyJS.jl. I imagine that it could be possible to have a chunk option that instead of putting a link to a figure file in the markdown output writes out the JSON necessary to rendenr the figure once the markdown output is converted to html. Getting the JSON of the figure would be pretty easy (see here).

mpastell commented 8 years ago

Yes, this would be nice. I will keep this in mind, but probably don't have time to work on it in the near future.

mpastell commented 7 years ago

There is now support for PlotlyJS and Plotly backends with Plots.jl (cbdf0e2 , I referended the wrong issue in the commit).

Pandoc currently embeds the whole plotly library in the html so this still needs to be fixed. You can also use "doc_type=pandoc" and call pandoc yourself without standalone option in which case plotly cdn is used.

sam81 commented 7 years ago

that's great. As far as I understand there is no support for this functionality using directly PlotlyJS as opposed to using it from the Plots.jl interface. It would be nice to support PlotlyJS directly (I use PlotlyJS directly rather than through the Plots.jl interface).

mpastell commented 7 years ago

Ok, I'll try to look into supporting PlotlyJS directly at some point. It shouldn't be too difficult to add.