3 ms·
Altair is getting pretty good. It's a bit like ggplot in that it's declarative, though I wouldn't suggest dropping R for this any time soon. https://altair-viz
by claytonjy 7y ago
Altair is getting pretty good. It's a bit like ggplot in that it's declarative, though I wouldn't suggest dropping R for this any time soon.
https://altair-viz.github.io/ https://altair-viz.github.io/
- koningrobot 7y agoAnother option is to use plotnine, which is intended to be a ggplot2 clone. It uses matplotlib under the hood, so if something isn't right you can tweak it. That was the main drawback I found with Altair: your declarative code is almost literally dumped to a json file and then rendered by a process external to Python, so good luck tweaking your plot. https://github.com/has2k1/plotnine https://github.com/has2k1/plotnine
- RobinL 7y agoI think there are some pretty good arguments for why Altair (which is just Python bindings for Vega Lite) should be people's first choice. I've written about this here https://medium.com/@robin.linacre/why-im-backing-vega-lite-as-our-default-tool-for-data-visualisation-51c20970df39 https://medium.com/@robin.linacre/why-im-backing-vega-lite-a.... In my mind, ggplot2 is actually more comparable to matplotlib in that it's more expressive, but less intuitive. It's interesting that the 'successor' to ggplot2,ggvis (which is on ice) , used Vega as a backend.