Repository: bokeh/bokeh

Issue:
surface3d example color fixed to z axis
#### ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
Python version 2.7.13
Anaconda2 Distribution 4.4.0 Community Edition
Bokeh version 0.12.5
nodejs version 9.11.0
Windows 8.1 Pro (Build 9600)
Chrome Version 65.0.3325.181 (Official Build) (64-bit) 

#### Description of expected behavior and the observed behavior
Trying to set the surface color to something other than the z axis values but the surface color does not change.

#### Complete, minimal, self-contained example code that reproduces the issue

Example was:
```
value = np.sin(xx/50) * np.cos(yy/50) * 50 + 50
source = ColumnDataSource(data=dict(x=xx, y=yy, z=value, color=value))
surface = Surface3d(x="x", y="y", z="z", color="color", data_source=source, width=600, height=600)
```

Example Updated to:
```
value = np.sin(xx/50) * np.cos(yy/50) * 50 + 50
color = np.linspace(0, 1, value.shape[0])
source = ColumnDataSource(data=dict(x=xx, y=yy, z=value, color=color))
surface = Surface3d(x="x", y="y", z="z", color="color", data_source=source, width=600, height=600)
```

#### Screenshots or screencasts of the bug in action
The image looks like the following regardless of what the 'color' argument is set to.
![image](https://user-images.githubusercontent.com/38538452/39009900-f300c340-43da-11e8-96e8-76ce91995a21.png)




Discussion:
This is actually a limitation of the `Graph3d` library, there is nothing to do about it, it will always colormap according to `z` using "rainbow" no matter what. But that's OK this simple example is only mean to be illustrative of the technique of wrapping an external JS library, not necessarily be useful on its own. However, the useless `color` argument should be removed for clarity. @dfudge1977 would you like to do that?
Looks like the example in the docs will need updating as well. 

https://bokeh.pydata.org/en/latest/docs/user_guide/extensions_gallery/wrapping.html

Resolving patch:
diff --git a/examples/app/surface3d/main.py b/examples/app/surface3d/main.py
--- a/examples/app/surface3d/main.py
+++ b/examples/app/surface3d/main.py
@@ -18,7 +18,7 @@
 
 def compute(t):
     value = np.sin(xx/50 + t/10) * np.cos(yy/50 + t/10) * 50 + 50
-    return dict(x=xx, y=yy, z=value, color=value)
+    return dict(x=xx, y=yy, z=value)
 
 source = ColumnDataSource(data=compute(0))
 
@@ -27,7 +27,7 @@ def compute(t):
 description = Div(text=open(content_filename).read(),
                   render_as_text=False, width=600)
 
-surface = Surface3d(x="x", y="y", z="z", color="color", data_source=source)
+surface = Surface3d(x="x", y="y", z="z", data_source=source)
 
 curdoc().add_root(Column(description, surface))
 
diff --git a/examples/app/surface3d/surface3d.py b/examples/app/surface3d/surface3d.py
--- a/examples/app/surface3d/surface3d.py
+++ b/examples/app/surface3d/surface3d.py
@@ -44,18 +44,16 @@ class Surface3d(LayoutDOM):
     # server by Python code
     data_source = Instance(ColumnDataSource)
 
-    # The vis.js library that we are wrapping expects data for x, y, z, and
-    # color. The data will actually be stored in the ColumnDataSource, but
-    # these properties let us specify the *name* of the column that should
-    # be used for each field.
+    # The vis.js library that we are wrapping expects data for x, y, and z.
+    # The data will actually be stored in the ColumnDataSource, but these
+    # properties let us specify the *name* of the column that should be
+    # used for each field.
     x = String
 
     y = String
 
     z = String
 
-    color = String
-
     # Any of the available vis.js options for Graph3d can be set by changing
     # the contents of this dictionary.
     options = Dict(String, Any, default=DEFAULTS)
diff --git a/sphinx/source/docs/user_guide/examples/extensions_example_wrapping.py b/sphinx/source/docs/user_guide/examples/extensions_example_wrapping.py
--- a/sphinx/source/docs/user_guide/examples/extensions_example_wrapping.py
+++ b/sphinx/source/docs/user_guide/examples/extensions_example_wrapping.py
@@ -82,7 +82,6 @@
         x:     source.get_column(@model.x)[i]
         y:     source.get_column(@model.y)[i]
         z:     source.get_column(@model.z)[i]
-        style: source.get_column(@model.color)[i]
       })
     return data
 
@@ -108,7 +107,6 @@
     x:           [ p.String           ]
     y:           [ p.String           ]
     z:           [ p.String           ]
-    color:       [ p.String           ]
     data_source: [ p.Instance         ]
   }
 """
@@ -136,18 +134,16 @@ class Surface3d(LayoutDOM):
     # server by Python code
     data_source = Instance(ColumnDataSource)
 
-    # The vis.js library that we are wrapping expects data for x, y, z, and
-    # color. The data will actually be stored in the ColumnDataSource, but
-    # these properties let us specify the *name* of the column that should
-    # be used for each field.
+    # The vis.js library that we are wrapping expects data for x, y, and z.
+    # The data will actually be stored in the ColumnDataSource, but these
+    # properties let us specify the *name* of the column that should be
+    # used for each field.
     x = String
 
     y = String
 
     z = String
 
-    color = String
-
 x = np.arange(0, 300, 10)
 y = np.arange(0, 300, 10)
 xx, yy = np.meshgrid(x, y)
@@ -155,8 +151,8 @@ class Surface3d(LayoutDOM):
 yy = yy.ravel()
 value = np.sin(xx/50) * np.cos(yy/50) * 50 + 50
 
-source = ColumnDataSource(data=dict(x=xx, y=yy, z=value, color=value))
+source = ColumnDataSource(data=dict(x=xx, y=yy, z=value))
 
-surface = Surface3d(x="x", y="y", z="z", color="color", data_source=source, width=600, height=600)
+surface = Surface3d(x="x", y="y", z="z", data_source=source, width=600, height=600)
 
 show(surface)


Test patch: