title: Bokeh - Apply color map to set of lines
body: <p>I have a piece of code that uses matplotlib to plot a set of lines and applies colors to those lines using a color map. The code excerpt and result are as follows:</p>
  
  <pre><code>cm = plt.cm.get_cmap('jet')
  step = 15
  xi = np.linspace(data[data.columns[0]].min(), data[data.columns[0]].max(), 2)
  colors_l = np.linspace(0.1, 1, len(state_means[::step]))
  for i, beta in enumerate(state_means[::step]):
      plt.plot(xi, beta[0] * xi + beta[1], alpha=.2, lw=1, c=cm(colors_l[i]))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/s0MX7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s0MX7.png" alt="Output using matplotlib"></a></p>
  
  <p>The relevant part of the code here is </p>
  
  <pre><code>c=cm(colors_l[i])
  </code></pre>
  
  <p>which is within the plt.plot() function. Here its is possible to index the color map using a parameter (i in this case).</p>
  
  <p>However, if i try to accomplish something similar using bokeh, with its ColorMapper and line() glyph, i run into and error. The relevant code lines and output are</p>
  
  <pre><code>call_color_mapper = LinearColorMapper(palette="Viridis256", low=min(call_strike_vals), high=max(call_strike_vals))
  call_lines=dict()
  call_chain_plot = figure(y_axis_label='Call OI', x_axis_label='Dates', x_axis_type = 'datetime')
  for strike in call_strikes:
      call_lines[strike] = call_chain_plot.line('TIMESTAMP', strike, line_color=call_color_mapper(int(strike[2:])), source=callSource)
  
  TypeError: 'LinearColorMapper' object is not callable
  </code></pre>
  
  <p>Is there a way to color a set of line glyphs using a color mapper in bokeh?</p>