yhat/ggplot — pull request #246 by has2k1 (2014-03-12 10:38:34+00:00)
Title: Geom improvements

This PR addressed the first 3 points of issue #175.

In the case that I may have to rebase on top of master, here are the commit messages that summarize what has happened.

----
__*commit 1: AESTHETICS lists as sets*__

**Issue**
AESTHETICS variables in ggplot and the geoms are
declared as lists.

**Problem**
The AESTHETICS variables are also used as tables for
lookup. This leads to unnecessary list travesal, an
O(n) operation.

**Solution**
Use sets.

**Fix tests**

Fix `stat_bin2d` test

Previous test depended on the generated layer order generated
by `ggplot._get_layers()`.

----
__*commit2: Rename geom_xxx.plot_layer & create geom.plot_layer*__

Go through the geom base class, and do the
common preprocessing steps. Reduces code duplication
througout the geoms.

---
__*commit3: Better geom arguments and try to match ggplot2 api*__

**What happened**
- Try to match ggplot2 api using `VALID_AES`, `REQUIRED_AES`
and `PARAMS` geom class variables.
- Introduce `geom.params` to hold the none aesthetic
geom parameters
- Introduce `TRANSLATIONS` geom class variable to help
automate the renaming between ggplot2 API aesthetics
names and matplotlib plotting arguments.
- Strip duplicate code from the geoms and remove
unused imports
- Fix up a few tests to match the changes.

----