Module Import alias identifier ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body If CompareNotIn AttributeLoad NameLoad attr ListLoad Num Num body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num CompareNotIn SubscriptLoad AttributeLoad NameLoad attr Index Num ListLoad Num Num body Raise Call NameLoad BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice NameLoad BinOpAdd NameLoad SubscriptLoad NameLoad Index Num Slice NameLoad BinOpAdd NameLoad SubscriptLoad NameLoad Index Num If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Slice Slice Num If CompareEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num keyword Num Return BinOpMod Str Call NameLoad NameLoad decorator_list decorator_list
N/A N/A numpy np PIL ImageFont ImageColorGenerator N/A object N/A N/A Color generator based on a color image.

    Generates colors based on an RGB image. A word will be colored using
    the mean color of the enclosing rectangle in the color image.

    After construction, the object acts as a callable that can be passed as
    color_func to the word cloud constructor or to the recolor method.

    Parameters
    ----------
    image : nd-array, shape (height, width, 3)
        Image to use to generate word colors. Alpha channels are ignored.
        This should be the same size as the canvas. for the wordcloud.
     __init__ N/A N/A self image N/A N/A N/A N/A N/A image ndim N/A 2 3 N/A N/A N/A ValueError N/A ImageColorGenerator needs an image with ndim 2 or 3, got %d N/A image ndim N/A N/A N/A N/A image ndim 3 N/A N/A N/A image shape N/A 2 N/A 3 4 N/A N/A N/A ValueError N/A A color image needs to have 3 or 4 channels, got %d N/A N/A image shape N/A 2 N/A N/A self image image N/A __call__ N/A N/A self word font_size font_path position orientation N/A kwargs N/A N/A Generate a color for a given word using a fixed image. N/A font N/A N/A ImageFont truetype font_path font_size N/A transposed_font N/A N/A ImageFont TransposedFont font orientation orientation N/A box_size N/A N/A transposed_font getsize word N/A x N/A position N/A 0 N/A y N/A position N/A 1 N/A patch N/A N/A self image N/A N/A x N/A x N/A box_size N/A 0 N/A y N/A y N/A box_size N/A 1 N/A N/A N/A patch ndim 3 N/A N/A patch N/A patch N/A N/A N/A N/A 3 N/A N/A N/A patch ndim 2 N/A N/A N/A NotImplementedError Gray-scale images TODO N/A color N/A N/A np mean N/A N/A patch reshape -1 3 axis 0 N/A N/A rgb(%d, %d, %d) N/A tuple color N/A N/A