News for hackers. Stuff that matters.
Re:Ggplot2 2.2.0 coming soon by jbmorgado on Monday October 03, 2016 @12:30PM (#12628874)
ggplot2 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 for an excellent introduction on how to tune matplotlib to use in papers.

Re:Ggplot2 2.2.0 coming soon by olsgaard on Tuesday October 04, 2016 @06:14PM (#12640006)
I didn't see anything about hatches in your link, which was surprising, since that is basically what you are saying is missing in ggplot.

I too was in need of monochrome for my thesis, and did a write-up for how to handle this in matplotlib by using hatches and cycles

http://olsgaard.dk/monochrome-black-white-plots-in-matplotli...

Re:Ggplot2 2.2.0 coming soon by hooloovoo_zoo on Tuesday October 04, 2016 @02:00AM (#12633564)
When you say "filling a curve with a pattern instead of a color, do you mean like this http://docs.ggplot2.org/0.9.3.1/aes_linetype_size_shape.html?
Re:Ggplot2 2.2.0 coming soon by olsgaard on Tuesday October 04, 2016 @06:15PM (#12640023)
He means hatches, similar to how the hatch demo [1] fills in boxplots

[1] http://matplotlib.org/examples/pylab_examples/hatch_demo.htm...

Re:Ggplot2 2.2.0 coming soon by jbmorgado on Tuesday October 04, 2016 @08:55AM (#12635138)
No, that's a line. I mean filling the curve, as in 2D, i.e. instead of using a solid color, using a pattern.
Re:Ggplot2 2.2.0 coming soon by nerdponx on Monday October 03, 2016 @01:31PM (#12629473)
Apart from using patterns instead of colors for filling space, what other black and white support does it lack?
Re:Ggplot2 2.2.0 coming soon by jbmorgado on Tuesday October 04, 2016 @09:00AM (#12635166)
Better 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.
Re:Ggplot2 2.2.0 coming soon by rz2k on Monday October 03, 2016 @01:56PM (#12629710)
Do you ever use lattice? It seems to have a lot of good default styles for black and white.
Re:Ggplot2 2.2.0 coming soon by jbmorgado on Tuesday October 04, 2016 @08:58AM (#12635157)
Well, 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.

Re:Ggplot2 2.2.0 coming soon by jimmar on Monday October 03, 2016 @12:08PM (#12628631)
Looks 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/

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.

Re:Ggplot2 2.2.0 coming soon by minimaxir on Monday October 03, 2016 @12:33PM (#12628899)
The syntax for ggplot2 is well documented in the docs, with explicit visual examples for each code block: 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.

Re:Ggplot2 2.2.0 coming soon by uptownfunk on Monday October 03, 2016 @12:11PM (#12628656)
Any 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.
Re:Ggplot2 2.2.0 coming soon by huac on Monday October 03, 2016 @12:33PM (#12628904)
Honestly 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/ if you want to get more into the nitty gritty.

Re:Ggplot2 2.2.0 coming soon by frankc on Monday October 03, 2016 @12:43PM (#12629006)
I have found this to be an excellent tutorial: http://tutorials.iq.harvard.edu/R/Rgraphics/Rgraphics.html

It explains the use but also the philosophy and design pretty well.

Re:Ggplot2 2.2.0 coming soon by minimaxir on Monday October 03, 2016 @12:29PM (#12628857)
Subtitles 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)
Re:Ggplot2 2.2.0 coming soon by psychometry on Monday October 03, 2016 @01:11PM (#12629283)
Honestly, 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.
Re:Ggplot2 2.2.0 coming soon by minimaxir on Monday October 03, 2016 @01:26PM (#12629420)
Stacked 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)
Re:Ggplot2 2.2.0 coming soon by nerdponx on Monday October 03, 2016 @01:33PM (#12629495)
Looks 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.
Re:Ggplot2 2.2.0 coming soon by rz2k on Monday October 03, 2016 @02:05PM (#12629810)
Reading 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.

Re:Ggplot2 2.2.0 coming soon by huac on Monday October 03, 2016 @02:44PM (#12630171)
It 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).
Re:Ggplot2 2.2.0 coming soon by rz2k on Monday October 03, 2016 @04:01PM (#12630840)
Take a look at the ggvis syntax here: http://ggvis.rstudio.com/ggvis-basics.html