'Takes a mpl collection object to extract and set up some Bokeh patches properties.'

def patches_props(self, source, patches, col):

    face_colors = get_props_cycled(col, col.get_facecolors(), fx=(lambda x: mpl.colors.rgb2hex(x)))
    face_colors = [convert_color(x) for x in face_colors]
    patches.fill_color = source.add(face_colors)
    edge_colors = get_props_cycled(col, col.get_edgecolors(), fx=(lambda x: mpl.colors.rgb2hex(x)))
    edge_colors = [convert_color(x) for x in edge_colors]
    patches.line_color = source.add(edge_colors)
    widths = get_props_cycled(col, col.get_linewidth())
    patches.line_width = source.add(widths)
    if (col.get_alpha() is not None):
        patches.line_alpha = col.get_alpha()
        patches.fill_alpha = col.get_alpha()
    offset = col.get_linestyle()[0][0]
    if (not col.get_linestyle()[0][1]):
        on_off = []
    else:
        on_off = map(int, col.get_linestyle()[0][1])
    patches.line_dash_offset = convert_dashes(offset)
    patches.line_dash = list(convert_dashes(tuple(on_off)))
