4 ms·
What is the state of the art in Python data visualisation compared to ggplot2 in R? Over the last few years I have gone exclusively with ggplot2 because it seem
by jackbrookes 7y ago
What is the state of the art in Python data visualisation compared to ggplot2 in R? Over the last few years I have gone exclusively with ggplot2 because it seems so intuitive and customisable.
- claytonjy 7y agoAltair 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.
- notnap 7y agobokeh (https://github.com/bokeh/bokeh https://github.com/bokeh/bokeh) and seaborn (http://seaborn.pydata.org http://seaborn.pydata.org) are popular
- j88439h84 7y agoPlotnine is a verbatim port of ggplot2. There are other ports but plotnine is the good one. https://plotnine.readthedocs.io/ https://plotnine.readthedocs.io/
- xioxox 7y agoCan I plug my Veusz GUI plotting application? It's written in Python, so it's also a Python plotting library. It's more a object-orientated library than matplotlib, so plots are built out of widgets. https://veusz.github.io/ https://veusz.github.io/
- genneth 7y agoSince version 4, plotly isn't horrible. It's okay. It does basic things fine enough that I use it almost exclusively. However, I most plot for personal analysis, not for presenting to others.