4 ms·
Python visualization needs a visionary like Hadley Wickham. Once you get used to the clarity of "Grammar of Graphics", every other plotting library feels like a
by msaharia 8y ago
Python visualization needs a visionary like Hadley Wickham. Once you get used to the clarity of "Grammar of Graphics", every other plotting library feels like a clumsy tool.
Also, people pointing out the diversity of needs behind the multiverse of plotting libraries in Python probably aren't aware of the large number of extensions built on top of ggplot2[1]. In python, they end up being completely new packages.
1. http://www.ggplot2-exts.org/gallery/ http://www.ggplot2-exts.org/gallery/
- wodenokoto 8y agoThere's a lot of good things to say about ggplot, but I feel like the best thing is RStudios ability to auto-complete column names of the input dataframe throughout your pipe of ggplot commands / functions. I think I would enjoy Python just as much if I figured out how to auto complete column names when writing code for my plots and pandas operations.
- laingc 8y agoPandas dataframes can autocomplete column names using the dot syntax.
- wodenokoto 8y agoI know I can auto complete with df.mycolumn But what about df.sort_values(by='mycolumn') In that kind of cases RStudios is smart enough to know that such an argument should be populated by a column name from the dataframe that function is being applied to.
- jononor 8y agoCan't you use df.mycolumn in that position, and get the completion?
- _Wintermute 8y agoggplot2 is great as a high level plotting library, though as soon as you want to do something slightly different you end up in the rats nest that is grob and ggproto (because 3 OOP systems aren't enough, so let's create an entirely new one just for this library). I normally give up and tolerate matplotlib instead.
- jbednar 8y agoPersonally, I don't _want_ a grammar of graphics; I want a grammar of data, where the data happens to have a graphical representation. I don't want to spend ages piecing together a fancy plot; I want to spend just a little time annotating my data to declare what it means, and then no matter how I slice and dice my data it will show up in a meaningful way. That way I can explore it to really understand it, which is the point of HoloViews (http://holoviews.org http://holoviews.org). But people approach plotting in lots of different ways, and some people actually _do_ want to spend their time making plots, so they are welcome to their ggplot2!
- gaius 8y agoI don't _want_ a grammar of graphics; I want a grammar of data, where the data happens to have a graphical representation The point of having a graphical representation is to communicate with other humans therefore some subjective judgement is required; there’s no “one true plot” for each type of data.
- jbednar 8y agoOf course! HoloViews does allow infinite customizability, to pull out more and more subtle features, show things more clearly, and just to make it look nice or to match your favorite style. But unlike ggplot2, HoloViews does that in a way that can apply to the _data_, rather than having to recapitulate the process every single time you build an individual plot. That way you and your colleagues can together build up whatever style you find most effective, then keep working with it across the full multidimensional landscape of data that you work with in a particular field. HoloViews is a completely different approach, if you really let the ideas sink in (e.g. from our paper about it at http://conference.scipy.org/proceedings/scipy2015/pdfs/jean-luc_stevens.pdf http://conference.scipy.org/proceedings/scipy2015/pdfs/jean-...), and is in no way a second-class citizen compared to ggplot2 or any other approach in R...
- gaius 8y agoI’ll check it out, thanks for the tip!
- RobinL 8y agoI think we have one in the team behind Vega Lite. Vega has a concise and well-designed grammar of graphics. It comes from the same academic centre (UW Interactive Data Lab) where Mike Bostock developed d3, and I think complements d3 nicely as a higher level tool. Hadley Wickham's slightly abortive ggvis project was a wrapper around Vega. Altair is the python library that wraps Vega Lite, making it even more concise to write chart specs. One important unique feature is that Vega and Vega Lite (and Altair) provide declarative syntax for complex interactions such as cross filters. I wrote a blog post recently with much more detail about all of this: 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...
- j88439h84 8y agoPlotnine is the good implementation of ggplot in python.