6 ms·
Why I use ggplot2
- th0ma5 11y agoPython's matplotlib was apparently good enough for the Gravitational Wave paper. I think both this post and the post it is arguing against are actually arguing the same thing... You have to think about what you are communicating and not just plot out things and say you're done.
- minimaxir 11y agomatplotlib is a bit off-topic for comparing R packages. No one is saying that either base or ggplot2 is insufficient for academic analysis, but one may be more practical than the other.
- chaosfox 11y agofor heatmaps with dendrograms there is ggdendro: https://plot.ly/ggplot2/ggdendro-dendrograms/ https://plot.ly/ggplot2/ggdendro-dendrograms/ but it's definitely not a streamlined experience.. most of the time I just use pheatmap: https://cran.r-project.org/web/packages/pheatmap/index.html https://cran.r-project.org/web/packages/pheatmap/index.html
- baldfat 11y agoI have found that base R graphics were a quick way to get a snapshot of things qplot always frustrated me in their syntax. I have replaced that with ggvis. I can do a 3 seconds of code and get a decent plot. I can then add a drop down menu and explore my data, but ggvis is guilty of Jeff Leek's criticism currently with a limit of the plot you can perform. Also ggvis exported to png is more a hassle then it is worth for me.
- minimaxir 11y agoA somewhat off topic note: that gganimate GIF is 3.5 MB, which is a very large file for a image that is not central to the argument! That's one of the reasons I was dissuaded from making GIFs from my ggplot2 charts, and it's why I created a Convert Frames to GIF tool (https://github.com/minimaxir/frames-to-gif-osx https://github.com/minimaxir/frames-to-gif-osx) to create higher-quality GIFs at manageable file sizes. (the first example GIF in my repo is about the same number of frames and resolution as the OP's GIF, but 1/7th of the filesize, of course due to the nature of GIFs this is not a straight comparison) That said, gganimate does sound like an interesting tool, and certainly much better than the animation package alone. The killer feature of ggplot2 that cannot easily be replicated in any GUI program is indeed faceting. There are also other geoms that are hard to do in base R/excel are things, like contour maps and native smoothed regression lines (with confidence intervals!)
- dang 11y agoEarlier post was discussed at https://news.ycombinator.com/item?id=11081961 https://news.ycombinator.com/item?id=11081961.
- keypusher 11y agoHonorable mention for yhat's port of ggplot2 to python. http://ggplot.yhathq.com/ http://ggplot.yhathq.com/
- scott_s 11y agoDo you have experience with it? If yes, do you prefer it over matplotlib (assuming you have experience with that)?
- glial 11y agoI have used it some, and my experience usually runs like this: (try simple thing) "Hey, it works!" (try slightly more complicated thing) "Too bad, this isn't implemented yet".
- kpil 11y agoR together with javascript is the worst languagues I know that I still have to use. This can remove 50% of that list. I will check out this right now!
- kldavenport 11y agoA fantastic set of APIs with Matplotlib under the hood: Seaborn Http://stanford.edu/~mwaskom/software/seaborn/