It's not very elegant, but if you want a high-quality version you can open 
the web inspector or equivalent in your browser and copy the SVG node into 
a text file. You can then render the SVG to PNG using a variety of tools at 
whatever resolution you need.

I very rarely do this (as you can probably guess, or I would have added a 
better way to do it!). Usually the stuff I generate is just for internal 
notes, and in that case I tend to just take a screenshot which doesn't give 
great resolution, but is ideal for clipping into a lab-book.

There's probably a way you can do it by exporting the vega spec and using 
vega's headless renderer, but I haven't tried that. 
(See https://github.com/vega/vega/wiki/Headless-Mode). Also, this might be 
of interest if you're going to be doing this often and use Chrome 
(http://nytimes.github.io/svg-crowbar/).


Jony

On Saturday, 16 January 2016 18:20:25 UTC, jandot wrote:
>
> Hi all,
>
> I have found the gorilla REPL (http://gorilla-repl.org/) very useful for 
> data analysis in clojure. One of the great benefits is that it can display 
> plots in-line (based on vega). When saving such notebook, these plots are 
> represented as base64 text strings in the .clj file. However, I have not 
> been able so save these images separately as e.g. PNG files.
>
> Does anyone know how to save a plot from a gorilla repl into a file?
>
> Many thanks,
> jan.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to