def table_plot():
 data = np.array([[1, 4, 2, 5, 2], [2, 1, 1, 3, 6], [5, 3, 6, 4, 1]])
 index = np.arange(len(data[0]))
 color_index = ['r', 'g', 'b']
 bottom = np.array([0, 0, 0, 0, 0])
 for i in range(len(data)):
  plt.bar((index + 0.25), data[i], width=0.5, color=color_index[i], bottom=bottom, alpha=0.7, label=('label %d' % i))
  bottom += data[i]
 plt.legend(loc='upper left', shadow=True)
 plt.show()
 return

def table_plot ( ) : data = np . array ( [ [ 1 , 4 , 2 , 5 , 2 ] , [ 2 , 1 , 1 , 3 , 6 ] , [ 5 , 3 , 6 , 4 , 1 ] ] ) index = np . arange ( len ( data [ 0 ] ) ) color_index = [ 'r' , 'g' , 'b' ] bottom = np . array ( [ 0 , 0 , 0 , 0 , 0 ] ) for i in range ( len ( data ) ) : plt . bar ( ( index + 0.25 ) , data [ i ] , width = 0.5 , color = color_index [ i ] , bottom = bottom , alpha = 0.7 , label = ( 'label %d' % i ) ) bottom += data [ i ] plt . legend ( loc = 'upper left' , shadow = True ) plt . show ( ) return
table plot .