def hist_fig(hist_data, plot_height, plot_width, x_range=None, epoch_axis=True):
 (name, hdata, dh, dw, bins, offset) = hist_data
 if (x_range is None):
  x_range = (0, dw)
 fig = figure(plot_height=plot_height, plot_width=plot_width, title=name, x_axis_label=x_label(epoch_axis), x_range=x_range, y_range=(offset, (offset + bins)))
 fig.image(image=[hdata], x=[0], y=[offset], dw=[dw], dh=[dh], palette='Spectral11')
 return fig

def hist_fig ( hist_data , plot_height , plot_width , x_range = None , epoch_axis = True ) : ( name , hdata , dh , dw , bins , offset ) = hist_data if ( x_range is None ) : x_range = ( 0 , dw ) fig = figure ( plot_height = plot_height , plot_width = plot_width , title = name , x_axis_label = x_label ( epoch_axis ) , x_range = x_range , y_range = ( offset , ( offset + bins ) ) ) fig . image ( image = [ hdata ] , x = [ 0 ] , y = [ offset ] , dw = [ dw ] , dh = [ dh ] , palette = 'Spectral11' ) return fig
generate a figure with an image plot for hist_data .