7 ms·
Ggplot2 version 2.0.0 released by Hadley Wickham
- rz2k 11y agoExtended 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/extending-ggplot2.html https://cran.r-project.org/web/packages/ggplot2/vignettes/ex...
- minimaxir 11y agoI'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.
- pjmorris 11y agoI just wanted to compliment you on the thorough job you did on the ggplot tutorial. In my wanderings, I haven't found anything that comes close, (the great) Dr. Wickham's materials included.
- minimaxir 11y agoHaha, thanks. I may have to do a follow-up, especially if ggplot2 2.0.0 is as breaking as I thought.
- hadley 11y agoIf 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 11y agoMostly 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 11y agoThanks! I think I have have underestimated how many people confused bar charts and histograms :/
- infinite8s 11y agoWell the only difference seems to be whether the x axis is ordinal or continuous.
- thalesian2 11y agoOh man, where do I even begin? Error in add_ggplot(e1, e2, e2name) : could not find function "is.coord" Error in (function (el, elname) : "panel.ontop" is not a valid theme element name... Error in layer(mapping = structure(list(x = element$Line, y = 0, xend = element$Line, : unused arguments (arrow = NULL, lineend = "butt", na.rm = FALSE, colour = "grey50", linetype = 2) Error : Unknown parameters: guides Error in FUN(X[[i]], ...) : attempt to apply non-function Error in coord_tern() : could not find function "coord" I just can't keep up with this - most of these errors are with objects I am not using (such as 'panel.ontop' when using theme(legend.position="bottom"). For those of us who chose (made the mistake?) of using ggplot2 with larger projects such as shiny, large updates like this which render all our past code mute presents a dilemma - do we keep re-learning this wheel or just stop updating altogether? The latter seems to be the only feasible course. Every plot implementation I had on my website was broken by this update. I don't mean to be mean, ggplot2 is a wonderful package, but this update presented all headaches.
- hadley 11y agoPlease file bugs on GitHub. It looks like you're using packages built on top of ggplot2 - in particular the maintainer of ggtern seems to have disappeared. Otherwise I'd highly recommend using packrat or similar so you can choose on a project by project basis when you want to upgrade selected packages.
- th0ma5 11y ago> 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.
- TheLogothete 11y agopackrat and especially checkpoint to the rescue!
- timwilliate 11y agoCheckpoint only allows specifying that all packages as they existed on a particular data in CRAN be downloaded and utilized within a project. This is limiting in that an R developer may want to utilize very specific versions of packages that span multiple epochs. I would really like to see R develop functionality akin to Maven or SBT, such that an R developer can explicitly specify the exact versions of all dependencies, which will then be installed at the first run.
- hadley 11y agoThat's the goal of packrat. (But it's still a work in progress)
- hadley 11y agoThis 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 11y agoI'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.
- zmmmmm 11y ago> 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!
- TheLogothete 11y agoAnd what do you use that even remotely approaches the breadth and depth of tools available in R, but solves this problem?
- zmmmmm 11y agoI wish I had a good answer to that, but I don't. Python is taking a good shot at it. But it doesn't match R by any means.
- kldavenport 11y agoseaborn, bokeh, pandas' built in methods, and plotly fill in the ggplot gap for me.
- hunterratliff1 11y agoSo perhaps we ought be working on building solutions that bridge the Python-R gap? Because as someone who has effectively left Python, I'd love to learn from solutions Python users find effective. After all, it's not like one language is the sole proprietor of useful approaches (;
- taylorwc 11y agoAs 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 11y agoThanks!