title: How to draw categorical bar plot using vbar method in Bokeh plotting module
body: <p>I wish to draw a bar plot using vbar method in Bokeh plotting, where x axis takes categorical values rather than numerical ones. The example provided in the tutorial page (<a href="http://docs.bokeh.org/en/latest/docs/reference/plotting.html" rel="nofollow noreferrer">http://docs.bokeh.org/en/latest/docs/reference/plotting.html</a>) has only numerical x axis.</p>
  
  <p>The bar plot must be updatable via widget and therefore it seems that Bar() cannot be used but instead I tried using vbar() method, where I can feed source data.</p>
  
  <p>I found several similar questions and answers from the history, but still they don't seem to exactly address the problem I have.</p>
  
  <p>I tried the following code snippet but it failed with some errors:</p>
  
  <pre><code>from bokeh.plotting import figure, output_file
  from bokeh.io import show
  from bokeh.models import ColumnDataSource, ranges
  from bokeh.plotting import figure
  import pandas as pd
  
  output_file("test_bar_plot.html")
  
  dat = pd.DataFrame([['A',20],['B',20],['C',30]], columns=['category','amount'])
  
  source = ColumnDataSource(dict(x=[],y=[]))
  
  x_label = "Category"
  y_label = "Amount"
  title = "Test bar plot"
  
  plot = figure(plot_width=600, plot_height=300,
          x_axis_label = x_label,
          y_axis_label = y_label,
          title=title
          )
  
  plot.vbar(source=source,x='x',top='y',bottom=0,width=0.3)
  
  def update():
          source.data = dict(
              x = dat.category,
              y = dat.amount
          )
          plot.x_range = source.data['x']
  
  update()
  
  show(plot)
  </code></pre>
  
  <p>It seems to work if I specify x_range as the figure() argument, but what I want to do is to be able to update categorical values according to widget's state, in which case, there must be some mechanism by which I can change the x_range on the fly.</p>
  
  <p>I would appreciate if you give me a fix.</p>
  
  <p>Thank you</p>