title: Display a 3D bar graph using transparency and multiple colors in matplotlib
body: <p>I have a dataframe where rows represent hours of the day and the columns represent time frequencies. The aim is to create a 3D bar chart and each column represented a different color. My dataframe is as follows </p>
  
  <pre><code>frec=pd.read_csv('tiempo.csv', parse_dates='Horas',index_col='Horas')
  frec.index=[date.strftime('%H:%M') for date in frec.index]
  
  frec
           Inicio  MaxExt  Fin
  18:00       1       1    1
  19:00       0       0    3
  20:00       1       1    1
  21:00       1       1    0
  22:00       3       1    0
  23:00       9       1    0
  00:00       8       3    2
  01:00       2       0    1
  02:00       3       8    1
  03:00       5       3    2
  04:00       6       2    6
  05:00       6       6    5
  06:00       5       6    4
  07:00       5       7    2
  08:00       2       4    5
  09:00       1       6    6
  10:00       0       3    2
  11:00       2       5    5
  12:00       4       1    9
  13:00       2       4    2
  15:00       0       2    3
  14:00       3       2    4
  15:00       0       2    3
  16:00       1       1    3
  17:00       0       2    3 
  </code></pre>
  
  <p>The following lines of code trying to create the plot</p>
  
  <pre><code>xpos=np.arange(frec.shape[0])
  ypos=np.arange(frec.shape[1])
  yposM, xposM = np.meshgrid(ypos+0.5, xpos+0.5)
  zpos=np.zeros(frec.shape).flatten()
  
  dx = 0.5 * np.ones_like(zpos)
  dy= 0.1 * np.ones_like(zpos)
  dz=frec.values.ravel()
  
  fig = plt.figure(figsize=(12,9))
  ax = fig.add_subplot(111, projection='3d')
  
  values = np.linspace(0.2, 1., xposM.ravel().shape[0])
  colors = cm.rainbow(values)
  
  ax.bar3d(xposM.ravel(),yposM.ravel(),zpos,dx,dy,dz,color=colors, alpha=0.5)
  
  
  ticks_x = np.arange(0.5, 24, 1)
  ax.set_xticks(ticks_x)
  ticks_y=np.arange(0.6,3,1)
  ax.set_yticks(ticks_y)
  
  ax.w_xaxis.set_ticklabels(frec.index)
  ax.w_yaxis.set_ticklabels(frec.columns)
  
  ax.set_xlabel('Hora')
  ax.set_ylabel('B')
  ax.set_zlabel('Occurrence')
  plt.xticks(ticks_x ['1PM','2PM','3PM','4PM','5PM','6PM','7PM','8PM','9PM','1OPM','11PM','12AM','1AM','2AM','3AM','4AM','5AM','6AM','7AM','9AM','10AM','11AM','12PM'])
  fig.autofmt_xdate()
  plt.show()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/4yPqI.png" alt="enter image description here"></p>
  
  <p>How I get a plot where each column is drawn with different color ?. Ie, the bars of Inicio column are blue, the bars of MaxExt column are red and the bars of Fin column are yellow</p>