TreeView.jl icon indicating copy to clipboard operation
TreeView.jl copied to clipboard

Save to SVG file

Open mroavi opened this issue 5 years ago • 3 comments

Is there a way to save the resulting picture as an SVG file? I know that with TikzPictures.jl you can use:

save(SVG("output"), tp)

but I haven't been able to connect this with TreeView.jl. The reason I would like to do this is because I don't use Jupyter notebooks. Instead I use Vim + REPL for writing Julia code.

If there exists an alternative to viewing the picture in a vim + REPL environment other than saving it and opening it with e.g. the browser, I would also be interested in knowing what it is. Thanks in advance.

mroavi avatar Sep 23 '20 08:09 mroavi

The result of @tree et al. is a TikzGraphs object. You can save it using the instructions in their docs:

https://nbviewer.jupyter.org/github/JuliaTeX/TikzGraphs.jl/blob/master/doc/TikzGraphs.ipynb

dpsanders avatar Sep 23 '20 14:09 dpsanders

A PR toTreeView.jl saying how to do this would be welcome!

dpsanders avatar Sep 23 '20 14:09 dpsanders

A PR toTreeView.jl saying how to do this would be welcome!

Have you had a chance to look at the PR? Regards.

mroavi avatar Oct 20 '20 08:10 mroavi