daattali / ggExtra

📊 Add marginal histograms to ggplot2, and more ggplot2 enhancements
http://daattali.com/shiny/ggExtra-ggMarginal-demo/
Other
383 stars 45 forks source link

Make sure marginal data comes from correct data frame #68

Closed crew102 closed 7 years ago

crew102 commented 7 years ago

I'll submit an updated PR for the marginal mapping feature once this is merged

daattali commented 7 years ago

Thanks for taking the initiative Chris! Have you checked what happens if there are multiple geom_point() layers? Would it take the first one (that would be fine, just make sure it doesn't error). Also, since this check is happening anyway, maybe it can be nice to throw an informative error if no appropriate layer is found, instead of whatever error R ends up throwing

crew102 commented 7 years ago

It still works if there are multiple calls to geom_point...getVarDF just needs one of them to be happy.

I've added an error message for when getVarDF can't find the data that it needs.

daattali commented 7 years ago

Awesome :)