
Ggplot2 – The code powering all those excellent charts is 10 years old - cgmil
https://qz.com/1007328/all-hail-ggplot2-the-code-powering-all-those-excellent-charts-is-10-years-old/
======
RA_Fisher
I've pretty much built my career using ggplot2 charting. Grammar of graphics
is a really smart idea. Hadley's a master interface designer and decent human-
being to boot! :)

I really can't express how thankful I am for Hadley's work.

------
minimaxir
ggplot2 _is_ the primary reason to use R. Not that Python's modern charting
libraries like bokeh/seaborn are bad, but ggplot2 is so robust and
customizable while requiring very little LOC. And that doesn't even include
external libraries which extended ggplot2, including pairs plots
([https://rdrr.io/cran/GGally/man/ggpairs.html](https://rdrr.io/cran/GGally/man/ggpairs.html))
and _automatic interactive charts_ with plotly
([https://plot.ly/ggplot2/](https://plot.ly/ggplot2/))

ggplot 2.2.0 added a lot of customization features which make it easier to
make a plot look more unique than the stereotypical ggplot2 chart, which I
plan to cover in a tutorial soon. (here's an older ggplot2 tutorial of mine
which still holds up: [http://minimaxir.com/2015/02/ggplot-
tutorial/](http://minimaxir.com/2015/02/ggplot-tutorial/) )

~~~
thearn4
I think the biggest issue with matplotlib is it's straddling of the fence
between MATLAB and pythonic syntax throughout the library. It makes it
actually pretty hard to predict what the syntax/call signature of a particular
method is if you don't use it fairly regularly.

~~~
Godel_unicode
This. Matplotlib is easily the most jarring library I use on anything like a
regular basis. I really want a requests-for-charting, which has a more
pythonic syntax.

~~~
thearn4
seaborn is actually pretty nice, though not as diverse.

------
buffont32
I don't think I've used a plotting system that even comes close to ggplot2 in
terms of intuitiveness. I honestly don't think that R would be held in such
high esteem without Wickham's contributions.

~~~
nerdponx
The original base R plotting system is wonderful in its own right, but for
different reasons.

~~~
hatmatrix
And then lattice also, which preceded ggplot2.

------
eclecticsceptic
I've gotten a fair amount of 100 percents, and most recently a job, for which
a lot of the credit goes to ggplot.

The funniest bit is that the non-technical think it's something extremely
complicated when in reality, after somewhat of a learning curve, it's more
intuitive than plotting in excel.

~~~
baldeagle
One of the main reasons I started with R all those years ago is because
updating the monthly charts in excel was (manual | time-consuming | boring),
but running printing a new batch of ggplots was a piece of cake. I literally
arrived for the graphics and stayed for the rest of R.

------
kraemate
I've always wanted to switch from python's matplotlib to ggplot, but never
found sufficient advantages to make the switch. Especially considering that I
use python for doing data analysis, and pandas+ipython-notebook can be tightly
integrated with matplotlib.

Plus I've found it easier to create compact figures necessary for academic
publishing with matplotlib. ggplot's defaults create graphs that take up too
much space!

~~~
hatmatrix
Not that this helps with the defaults, but you can use something ggplot2-like
in python now:

[https://plotnine.readthedocs.io/en/stable/](https://plotnine.readthedocs.io/en/stable/)

------
jtcond13
To those of you who hate R, consider investing 1/2 hour to learn the dplyr
package. Dplyr is, in my view, Hadley Wickham's real masterpiece and is why I
use R for most data analysis nowadays.

As for ggplot, the 'grammar of graphics' approach makes it intuitive to get
started with but I often run into trouble with both the inheritance hierarchy
and with getting graphics 'the last mile' to presentation-quality.

My favorite ggplot2 graphic? The London Cycle Hires Map:

[http://spatial.ly/2012/02/great-maps-
ggplot2/](http://spatial.ly/2012/02/great-maps-ggplot2/)

