palantir/plottable — pull request #564 by jtlan (2014-06-17 18:44:25+00:00)
Title: Add in NumberAxis

Close #517.
Close #225.
#556 is also fixed if you use `NumberAxis`, but I'd hold off on closing that until we actually remove the old `Axis` class.

Differences from original `Axis`:
- Only handles numerical data.
- End tick labels shown by default.
- Baseline shown by default.
- Can only take in a Plottable `Formatter` (`Abstract.Formatter`) for the formatter.
- Can't set the position tick labels relative to the tick marks (they are always centered), but that functionality can be added in (no one seems to be using it right now).

In addition, `NumberAxis` will try to auto-size its width/height (if vertical/horizontal), although an explicit width/height can be forced with the `width()` and `height()` calls. Calling those functions with an argument of "auto" will switch auto-sizing back on. In the future, I'm going to try to move that functionality to `BaseAxis`, as other axis types may want that functionality.

Going forward, I think a good policy is to show as many features of a component as possible by default, so people know they exist (in this case, baseline and end labels, even though the labels may be cut off).

I'd also like some discussion regarding auto-width/height. Generally, I think it's helpful to be able to auto-size, but I don't expect we can come up with good/efficient algorithms in all cases, which is why I think it's important to have a user-controllable override for sizing.