3 ms·
I’ve used both, have written dataviz libraries so know less than zero, and have never seen this distinction made nor agree with it. I wouldn’t even consider th
by jwilber 5y ago
I’ve used both, have written dataviz libraries so know less than zero, and have never seen this distinction made nor agree with it.
I wouldn’t even consider the two to have different purposes. Let alone “drastically” different. Drastically different api’s? Definitely. But purpose? No way.
- krastanov 5y agoThe distinction between "stats" plots and "science/engineering" plots is a pretty standard thing for every scientist I have worked with. Data for stats plots is usually represented well in a dataframe. Data for "science/engineering" plots does not always make sense as a dataframe. One is a small subset of the other. Maybe we are in different fields but for anyone I would be working with it is screamingly obvious that these two libraries have different goals. How would you even make cut-axis quiver plot over 3D isosurfaces and 2D contour projections with a bunch of insets for instance in ggplot? In python, matplotlib would be the obvious choice and it is better than pretty much all R or Julia options in terms of fidelity of control (Makie.jl is getting there and has a good interface). I do not think ggplot is at all capable of that, and it would be silly to do it with ggplot anyway given that the input data is not represented by a dataframe well.
- jwilber 5y ago“How would you even make [super specific plot]?” Ask on stack overflow, but a 10 second google shows that geom_quiver is a thing. From my view, the bigger distinction confounding your point is that most people doing non-dataframe oriented engineering work are using Matlab/Python/Julia over R. That would explain the preference for matplotlib, as the api was literally inspired from matlab (an inspiration shared by Julia as well). But I expect it’s more of a convenience thing than anything - why shove a specific part of a different language (tidyverse api for R) into your workflow when the existing solution already works enough? But R can work just as well, especially given the myriad of tertiary packages designed to transform your data into a “tidy” data frame (eg tidyr). In any case, if you’re goal is something complicated or bespoke, wrestling with matplotlib is probably the least friendly option available, but ggplot isn’t the best option either. You should just use JavaScript.
- krastanov 5y agoYou know that "non-dataframe oriented engineering" is most of physics and engineering, right? It was not a super specific example, it was a standard example of a plot of a field, a type of data that makes no sense as a dataframe. I know that ggplot is great at what it does but why can you not accept that your work and the tools you like using for your work are a small subset of dataviz? I am sure you are great at your corner of it, but the suggestions you are making are just silly for other types of very common dataviz. And the "inspiration shared by Julia as well" comment is just factually wrong if you are still talking about dataviz libraries. It is *mostly* wrong about the language as a whole. And using JavaScript is a silly suggestion if you want publication quality static plots. And D3 is a ridiculously bad suggestion for engineering plots that is drastically more difficult to use than matplotlib for bespoke engineering visualizations. The reason matplotlib is the library used for the vast majority of physics and engineering journal papers is not simply inertia, it is the ease with which it customizes engineering plots. Most of my work takes 30ish lines in matplotlib (the nicer OO interface), is impossible in ggplot, and would take hundreds of lines in D3. But yes, when I work with data frames, of course I would use something like ggplot, not something like matplotlib.