Repository: bokeh/bokeh

Issue:
scatter broken in axis placement
in bokeh version 0.5.2

```
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-25-f8f548f918b3> in <module>()
----> 1 Scatter(OrderedDict([('overall', results.values)]), xlabel='True', ylabel='Predicted').notebook().show()

/om/user/satra/envs/testenv/lib/python2.7/site-packages/bokeh/charts/scatter.pyc in show(self)
     85         chart.get_data_scatter(**self.pairs)
     86         chart.get_source_scatter()
---> 87         chart.start_plot()
     88         chart.scatter()
     89         chart.end_plot()

/om/user/satra/envs/testenv/lib/python2.7/site-packages/bokeh/charts/_charts.pyc in start_plot(self)
    258 
    259         # Add axis
--> 260         xaxis = self.make_axis("bottom", self.xscale, self.xlabel)
    261         self.plot.below.append(xaxis)
    262         yaxis = self.make_axis("left", self.yscale, self.ylabel)

/om/user/satra/envs/testenv/lib/python2.7/site-packages/bokeh/charts/_charts.pyc in make_axis(self, location, scale, label)
    310             axis = LinearAxis(plot=self.plot,
    311                               location=location,
--> 312                               axis_label=label)
    313         elif scale == "date":
    314             axis = DatetimeAxis(plot=self.plot,

/om/user/satra/envs/testenv/lib/python2.7/site-packages/bokeh/objects.pyc in __init__(self, ticker, formatter, **kwargs)
    480 class LinearAxis(ContinuousAxis):
    481     def __init__(self, ticker=BasicTicker(), formatter=BasicTickFormatter(), **kwargs):
--> 482         super(LinearAxis, self).__init__(ticker=ticker, formatter=formatter, **kwargs)
    483 
    484 class LogAxis(ContinuousAxis):

/om/user/satra/envs/testenv/lib/python2.7/site-packages/bokeh/objects.pyc in __init__(self, **kwargs)
    446 
    447     def __init__(self, **kwargs):
--> 448         super(GuideRenderer, self).__init__(**kwargs)
    449 
    450         if self.plot is not None:

/om/user/satra/envs/testenv/lib/python2.7/site-packages/bokeh/plot_object.pyc in __init__(self, **kwargs)
    147 
    148         if not block_events:
--> 149             super(PlotObject, self).__init__(**kwargs)
    150             self.setup_events()
    151         else:

/om/user/satra/envs/testenv/lib/python2.7/site-packages/bokeh/properties.pyc in __init__(self, **kwargs)
    526         for key, value in kwargs.items():
    527             if key in props:
--> 528                 setattr(self, key, value)
    529             else:
    530                 raise AttributeError("unexpected attribute '%s' to %s, possible attributes are %s" %

/om/user/satra/envs/testenv/lib/python2.7/site-packages/bokeh/properties.pyc in __set__(self, obj, value)
     73 
     74     def __set__(self, obj, value):
---> 75         self.validate(value)
     76         value = self.transform(value)
     77         old = self.__get__(obj)

/om/user/satra/envs/testenv/lib/python2.7/site-packages/bokeh/properties.pyc in validate(self, value)
    906 
    907         if not (value is None or any(param.is_valid(value) for param in self.type_params)):
--> 908             raise ValueError("expected an element of either %s, got %r" % (nice_join(self.type_params), value))
    909 
    910     def transform(self, value):

ValueError: expected an element of either Enum('auto') or Enum('above', 'below', 'left', 'right'), got 'bottom'
```



Discussion:

Resolving patch:
diff --git a/bokeh/charts/_charts.py b/bokeh/charts/_charts.py
--- a/bokeh/charts/_charts.py
+++ b/bokeh/charts/_charts.py
@@ -257,14 +257,14 @@ def start_plot(self):
         self.categorical = False
 
         # Add axis
-        xaxis = self.make_axis("bottom", self.xscale, self.xlabel)
+        xaxis = self.make_axis("below", self.xscale, self.xlabel)
         self.plot.below.append(xaxis)
         yaxis = self.make_axis("left", self.yscale, self.ylabel)
         self.plot.left.append(yaxis)
 
         # Add grids
-        self.make_grid(xaxis, 0)
-        self.make_grid(yaxis, 1)
+        self.make_grid(0, xaxis.ticker)
+        self.make_grid(1, yaxis.ticker)
 
         # Add tools
         if self.tools:
@@ -323,11 +323,11 @@ def make_axis(self, location, scale, label):
 
         return axis
 
-    def make_grid(self, axis, dimension):
+    def make_grid(self, dimension, ticker):
         "Create the grid just passing the axis and dimension."
         grid = Grid(plot=self.plot,
                     dimension=dimension,
-                    axis=axis)
+                    ticker=ticker)
 
         return grid
 


Test patch: