9 ms·
Anyone have experience with both MatPlotLib and Vega / Vega-lite? I like working in Clojure and am just about to do a bunch of data-viz. I've only done a simpl
by newtwilly 5y ago
Anyone have experience with both MatPlotLib and Vega / Vega-lite? I like working in Clojure and am just about to do a bunch of data-viz.
I've only done a simple line chart so far, and I used this oz library for interfacing with Clojure and displaying results in the browser. [1]
One of the problems was lack of error messages. Not sure what part of the tooling was failing me there.
[1]. https://github.com/metasoarous/oz https://github.com/metasoarous/oz
- gimagon 5y agoI can't speak to oz's error messages, but for the vega-lite + python integration, I've found altair pretty usable. In particular, simple scatter plots with tooltips were easy to get up and running. https://altair-viz.github.io/ https://altair-viz.github.io/ https://altair-viz.github.io/gallery/scatter_tooltips.html?highlight=tooltips https://altair-viz.github.io/gallery/scatter_tooltips.html?h...
- geokon 5y agoif you need simple output you can just run clojure in orgmode and output svg https://geokon-gh.github.io/literate-clojure.html https://geokon-gh.github.io/literate-clojure.html
- newtwilly 5y agoThanks for sharing. I may do this if I ever decide to do some 'notebook' style work. Oz mentions integrating with jupyter and whatever else, but I love org-mode and wouldn't really want to start using a tool other than Emacs if I could avoid it :)
- geokon 5y agoTo be clear, there isn't really any org magic going on. You can also do the same identical stuff directly from a REPL and just spit the SVGs to file. I've also used the same stuff in a GUI - where the SVGs are rendered directly in the UI (I just parse the SVG elements and draw to the Canvas) Oz/Vega/etc. innately have this blackbox JS layout/rendering layer which I'm weary of. Here you are just manipulating SVG hiccup directly in Clojure. And then at the very last stage it's exported to SVG's XML syntax.