hadley/ggplot2 — pull request #364 by wch (2012-01-20 21:40:53+00:00)
Title: Add method to find coordinate mapping

This addresses #361. It adds a function to find what a coordinate transforms maps x and y to -- for example, x and y; y and x; or theta and x.

This makes it possible to have a general method to find the ranges of the x and y, even after transformation.

* I don't really like the method name I used, `coord_find_varmapping()` but I couldn't think of a better one. I'm open to suggestions.
* I updated abline, hline, and vline to use it. Now all of these work with coord_flip and coord_polar.
* I also added visual tests for abline, hline, and vline. No test for abline with coord_polar, for reasons discussed in #361.