
Ggplot2 version 2.0.0 released by Hadley Wickham - rz2k
http://blog.rstudio.org/2015/12/21/ggplot2-2-0-0/
======
zmmmmm
> instead, we now use ggproto, a new OO system designed specifically for
> ggplot2

And this is why I gave up on R for other things than ad hoc data exploration
(don't get me wrong; it's killer for that). When I finally learned there were
no less than four system of OO buried in base R, and still people were unhappy
and inventing more, I realised that as far as well structured programming
goes, R is kind of beyond help at this point.

From what I can tell, my biggest disappointment with ggplot2 is not addressed
- the fact that ggplot evaluates all references not found in the data frame to
be plotted in the global namespace. The result is that you can't actually make
reusable, composable plots in a reasonable sane way. It sends the whole
illusion of composability that ggplot()'s '+' syntax suggests might be there
right down the tubes. My plots were all more reusuable before I ported them to
ggplot (ie, in base graphics).

Apologies for the whining, and congrats to Hadley!

~~~
tenfingers
My biggest problem with ggplot is that it's slow, unbearably slow. It also
enforces all data to be realized into a single dataframe, which is true only
for small (as is: fits in memory) datasets.

Very often, to produce specialized plots, I have to send data to the canvas in
chunks by performing pre-processing myself. ggplot really doesn't work in this
scenario. Combined with the general slowness, it forces me to use alternatives
quite frequently.

It's a bummer, really, because I'd like my plots to have a consistent visual
style, and doing that across different plotting packages is an issue.

I very often resort to gnuplot when it comes to huge datasets and/or
incremental plotting. The same is true also in python (matplotlib is also very
slow, independently of the backend). But at least, if you use seaborn
([https://github.com/mwaskom/seaborn](https://github.com/mwaskom/seaborn)),
you can easily intermix the easiness of plotting through a DataFrame or just
supply data arrays.

ggplot is really awesome for what it does, but 1) the syntax doesn't really
please me (feels just plainly forced onto the wrong context 2) doesn't scale,
which forces me to use alternatives too frequently 3) trying to customize the
plot style beyond a few minor tweaks is pure hell.

~~~
angdis
At the end of the day, the whole point of ggplot is to produce a graphical
representation of some aspect of the data. How much information can you
possibly cram into ONE graphic and have it be readable by a human? Your
problem is really a data reduction problem and not a plotting/graphics
problem.

~~~
tenfingers
The data that goes into the plot is unrelated to it's visual complexity.

The "problem" is that ggplot also takes care of the transformation/reduction
step for you.

For example, a KDE plot can source potentially a limitless amount of data
while still generating a very simple plot. Likewise for most smoothers.

However, if I have to produce the kde/smoothed line myself, I lose almost all
advantages of using ggplot (I have to manually calculate the visual density,
scaling and attaching labels is another PITA).

On top of that, as other have said, ggplot really struggles already with
thousands of entries. A simple 5x5 faceted scatterplot with ~10k points might
take seconds to render on recent hardware. When I plot data interactively for
exploration, I might do this hundreds of times a day. I lose all the
convenience just in the time wasted for rendering.

------
minimaxir
I've spent a _lot_ of time working with ggplot2 for making advanced data
visualizations. For reference, I wrote a nice tutorial on how ggplot2 can be
used to make nice charts easily and effectively:
[http://minimaxir.com/2015/02/ggplot-
tutorial/](http://minimaxir.com/2015/02/ggplot-tutorial/)

To put the scope of the changes in the 2.0.0 release in perspective, I suspect
that the simple tutorial is now broken, let alone the code for my more
intricate charts. I'm not upset about it through, since all the changes,
especially breaking ones, are well-reasoned and well-documented. Hadley did a
great job of explaining everything.

I'll have to spend some time diving into ggproto.

~~~
hadley
If it does break stuff that you think it shouldn't please let me know. Goal is
to do a patch release in a month or two to fix anything I broke accidentally.

~~~
minimaxir
Mostly the geom_bar and geom_histogram split, which I agree was a good idea.

I also used the order parameter on a few visualizations, so I'm unsure how to
order a stacked bar chart without it. I'll give it another look and see what I
find and file as appropriate.

~~~
hadley
Thanks! I think I have have underestimated how many people confused bar charts
and histograms :/

~~~
infinite8s
Well the only difference seems to be whether the x axis is ordinal or
continuous.

------
rz2k
Extended release notes here[1] as well as an explanation of the new object
system for extending it, _ggproto_ , here[2]

[1]
[https://github.com/hadley/ggplot2/releases/tag/v2.0.0](https://github.com/hadley/ggplot2/releases/tag/v2.0.0)

[2]
[https://cran.r-project.org/web/packages/ggplot2/vignettes/ex...](https://cran.r-project.org/web/packages/ggplot2/vignettes/extending-
ggplot2.html)

------
th0ma5
> although I’ve tried to minimise breakage as much as possible

The R community really needs to grasp version control head on. There are some
great tools, and using git or similar works just fine, but their central
packaging system only knows about the latest version of everything.

~~~
hadley
This is actually a huge strength for the R community, who by and large are not
programmers and just want stuff to work. The fact that the latest version of
all CRAN packages actually work together makes life much easier. And for
experts there are tools like packrat and checkpoint that give you more
control.

~~~
th0ma5
I'm sorry, but this mindset is very harmful. If I need an old version of a
package and I didn't save it off somewhere first, it simply cannot be found.

~~~
mattdowle
Huh? There's an archive link on the CRAN page for every package; e.g. ggplot2
back to 2007:
[https://cran.r-project.org/src/contrib/Archive/ggplot2/](https://cran.r-project.org/src/contrib/Archive/ggplot2/)

------
taylorwc
As someone who has suffered through a few different smallish projects with R,
I don't think it would be even remotely worth using without ggplot2 and
Hadley's other amazing contributions, especially dplyr and rvest. Easy to find
flaws in R, but ggplot2 makes it easy-ish to produce nice-looking plots.

~~~
hadley
Thanks!

