Live data from Hacker News

Python Data Visualization 2018: Why So Many Libraries?

anaconda.com

51–60 of 105 posts

Re: Python Data Visualization 2018: Why So Many Libraries?

#51
post #17
post #16

There's like 15 comments in this post and 10 different suggestions on what visualization library to use. That's not great.

Yup. A likely result is that if you pick one and spend the time to learn it and use it for a project, there's a non-trivial chance that the choice you make will be join the ever growing collection of library abandon-ware in the not too distant future. This is why my favorite Python visualization tools are not Python - I've been burned too many times by libraries coming and going, and I just don't have the time to spe…

Matplotlib is often a dependency for Python dataviz libraries.

I often just skip the middlemen and use it directly.

Matplotlib isn't going away any time soon.

Re: Python Data Visualization 2018: Why So Many Libraries?

#52
post #26

As a ROOT guru and occasional pythonist, I recommend PyROOT especially if you want to interactively explore what you're plotting.

As someone who used to use ROOT, I would strongly recommend against it. Its C++ implementation has all manner of hidden state, and this leaks into PyROOT. For example, ROOT has the concept of ownership, entirely distinct from the python sense of references. A file owns the histograms that were read from it. Closing the file changes all references to histograms read from that file to None. It took a large amount of di…

Yeah it has a lot of state that's not very pythonic (and I almost always use it from c++ or cling) but it is very good for semiinteractive plotmaking that's not possible in something like matplotlib. A lot of ROOT's legacy from the 90's shows, but ROOT6 has made a lot of progress.

Re: Python Data Visualization 2018: Why So Many Libraries?

#54
post #28

The reason there's so many libraries is that none of them has emerged as a clear leader. If there was one really great library for the majority of use-cases, you'd see consolidation around it, like you mostly have with ggplot2 in R.

A variety of choice is fine. It certainly doesn't hinder anyone.

It hinders collaboration and the development of an ecosystem. One nice thing about ggplot2 is how there's a growing universe of things to support it -- packages to extend it or to add themes or what have you. Having more options means that effort gets split.

Re: Python Data Visualization 2018: Why So Many Libraries?

#55
post #29

I'm pretty good at Python and do most of my work in it nowadays, but if I need to make a data visualization, I still go to R just for ggplot2. Nothing currently in Python compares (not even the "ggplot2 port"), and it takes an order of magnitude longer to make a comparable viz.

How do you transfer data from Python to R? I like the look of ggplot2, but most of my data I keep as pickle files.

Feather, based on the Apache Arrow format, is a lot faster than CSVs, and there's good support in both R and Python for it, maintained by Hadley Wickham (who has developed Almost Ever R Package You've Heard Of) and Wes McKinney (who is the BDFL of pandas) respectively. It also involves less inferring of data types using heuristics.

Re: Python Data Visualization 2018: Why So Many Libraries?

#56

Earlier quoted context omitted.

I used root in astrophysics for a couple things, but that's hardly outside it's intended audience. yt is generally considered to be easier to pick up now instead though.

yt is magnitudes better than root that putting them in the same sentence is as sensible as comparing apples to jurisprudence.

ROOT and yt have quite different domains (although it's probably possible for each to emulate the other...) so I'm not sure it makes sense to compare them.

Re: Python Data Visualization 2018: Why So Many Libraries?

#58

I'm pretty good at Python and do most of my work in it nowadays, but if I need to make a data visualization, I still go to R just for ggplot2. Nothing currently in Python compares (not even the "ggplot2 port"), and it takes an order of magnitude longer to make a comparable viz.

Check plotnine, which is a decent reimplementation of ggplot2 in python: https://plotnine.readthedocs.io/en/latest/

I find myself often using the R ggplot2 documentation for using plotnine - it is such a decent port!

Re: Python Data Visualization 2018: Why So Many Libraries?

#59
post #23

While appreciate this catalog of options this is a lengthy article about different visualization libraries and there are no actual images of what they look like.

There are links to each library included, which will let you look at galleries of examples that are much more helpful than any single image would be. But if you want to collect images from each library, feel free to post that in the comments!

Re: Python Data Visualization 2018: Why So Many Libraries?

#60
I don’t really understand the appeal of D3. It’s basically just a thin wrapper over SVG, so thin in fact, to do anything interesting, you’re stuck manipulating SVG elements yourself.

There’s a good idea there, but D3 just isn’t quite right.

Post reply on HN