5 ms·
Ggplot2 2.2.0 coming soon
- jimmar 10y agoLooks more like an evolution which is fine. I don't see this version changing the way I use ggplot2 for research. I wish I could remember the syntax better. Every time I want to use ggplot2 I feel like this: https://xkcd.com/1168/ https://xkcd.com/1168/ I have to google the syntax or look at my previous R code every time. I'd love to have some sort of interactive plot designer GUI built into RStudio that produced the R code.
- uptownfunk 10y agoAny good resources on understanding how ggplot2 works?? I always want to use it but am so pressed for time I just end up using tableau.
- frankc 10y agoI have found this to be an excellent tutorial: http://tutorials.iq.harvard.edu/R/Rgraphics/Rgraphics.html http://tutorials.iq.harvard.edu/R/Rgraphics/Rgraphics.html It explains the use but also the philosophy and design pretty well.
- huac 10y agoHonestly I'd focus on using it a couple times and the syntax should feel very natural afterwards. Understanding what the `aes` command is doing is the most important: it's mapping a set of features to the plot, and then you are adding various `geom` objects that visualize those features. There is a book: http://ggplot2.org/book/ http://ggplot2.org/book/ if you want to get more into the nitty gritty.
- minimaxir 10y agoThe syntax for ggplot2 is well documented in the docs, with explicit visual examples for each code block: http://docs.ggplot2.org/current/ http://docs.ggplot2.org/current/ In contrast, base R graphics have little documentation (aside from function definitions in help) and few visual aids aside from old random blog posts.
- minimaxir 10y agoSubtitles and bar chart stack order are huge because the existing way of doing them is hard to maintain with a consistent behavior. (the former requires wrapping the title using an expression function, the latter was broken in 2.0.0 when the order parameter was removed, and setting the order in the factor directly did not work consistently)
- psychometry 10y agoHonestly, I'd be fine with stacked bar charts being completely removed as a feature. I have a hard time imagining a situation when they are the best plot to use.
- minimaxir 10y agoStacked bar charts are the best way to represent percentage proportions without using an pie chart. (Incidentially, pie charts in ggplot2 are stacked bar charts transformed with polar coordinates)
- jbmorgado 10y agoggplot2 is beautiful by default and it's full of interesting features. But it still remains unusable for publication due to lack of even basic B&W support. It can't do even the basics like filling a curve with a pattern instead of a color. When you are publishing in academia, many journals ask extra for publishing in Color or don't even support it, so this is an important feature. I end up using matplotlib in python, which - unlike what some people think - can be make to output fantastic quality graphics, although with a lot more effort than ggplot2. You can check https://github.com/jbmouret/matplotlib_for_papers https://github.com/jbmouret/matplotlib_for_papers for an excellent introduction on how to tune matplotlib to use in papers.
- nerdponx 10y agoApart from using patterns instead of colors for filling space, what other black and white support does it lack?
- jbmorgado 10y agoBetter manipulation of axis is one. For instance, being able to add divisions and sub divisions just to the axis and do away without lines through all the plot area.
- rz2k 10y agoDo you ever use lattice? It seems to have a lot of good default styles for black and white.
- jbmorgado 10y agoWell, lattice has really nice defaults to reduce the clutter when printing. But it's still missing patterns for filling curves as any other library based in ggplot2 because ggplot2 simply doesn't have support for it. What is more strange, is that most modern libraries (plotly, bokeh, etc) also do away without those capabilities. The result, is that they all look very nice on the screen, but when you have to print in B&W or low color resolution, they all fail.
- 10y ago
- nerdponx 10y agoLooks like a lot of great quality-of-life features made it into this update. There will be plenty of questions on Stackoverflow with messy hacky answers that now don't even need to be asked.
- rz2k 10y agoReading elsewhere, it sounds possible that more attention for `ggvis` is on the menu once `ggplot2` is in a more complete form, so I'd hoped that `ggplot2` would adopt "%>%" pipes, rather than "+" for composing plots. It would be convenient to adopt one mental model that would be more easily transferable between the two, as well as `ddplyr`, `tidyr`, etc.
- huac 10y agoIt doesn't make sense to use `%>%` in plots IMO because that implies you're going to wrap the lhs in the function denoted in the rhs (as the pipe is treated in dplyr/magrittr).
- rz2k 10y agoTake a look at the ggvis syntax here: http://ggvis.rstudio.com/ggvis-basics.html http://ggvis.rstudio.com/ggvis-basics.html
- deleted 10y ago[deleted]