Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While I'm not as fond of ggplot2 as the author is, and actually prefer base graphics when making things for publication, I think he hits on a lot of strong points.

I'm rather fond of R as a language, and hop between it and Python as my preferred tools of choice for a given task. I think the package ecosystem is it's biggest plus - for statistical work, Python might have a package to do something, R almost certainly will.



I think the opinion of ggplot2 is unanimous: you can do so much more with it — but Lord Almighty, what an expense of time it is to do anything specific! People like it or not depending on how they value their free time.

I always check in details with newbies what they are trying to do before I mention that name (it used to be surprisingly hard to come across it randomly) because once I have, it’s a rabbit hole -- and they generally have weird ideas, that need more several single-dimension graphs, easily done with hist() and plot(); however, anything a little subtle benefits so much from that flexibility.

I still don’t understand why bucketed log-scale for histogram and properly typed percentage scales (i.e. “10%” and not “0.1”) are so hard to do, but I love impressing the one guy who tried by showing those casually.


I think it's a bit of a stretch to say that your opinion of ggplot2 is unanimous. Obviously I'm rather biased, but I think there is some evidence to suggest that once you understand the grammar of graphics based approach, you can create many EDA graphics faster with ggplot2 than base or lattice.

Tweaking plots for presentation is obviously more challenging, but I think it's a challenge with every graphics system.


For most of what I want to plot, I find ggplot code faster and easier to write than base R graphics (and prettier, but that's subjective). This includes using ggplot::qplot for quick one-off plots.


While this isn't an elegant workaround, I've found resolving minor formatting issues like percentages in Inkscape to be really useful.

The end of this article[1] details how to export your plots as SVG files for use in Inkscape or any other vector graphics editor.

[1] http://www.noamross.net/blog/2013/11/20/formatting-plots-for...


isn't it simply scale_y_log10(labels=percent_format())?


That’s one case, that doesn’t work well with user-defined buckets, has an unexplainable tendency to shift to ‘10.00%‘ when there is no room to do so and works with only certain of ggplot many wonderful graphs… But yes, that one, when it works is generally great.


It should work with any plot that has a y range greater than 0. ggplot2 can't do anything to fix the fact that log(x) for x <= 0 is undefined.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: