word_cloud_util¶
Support utilities for word cloud generation.
Functions
|
Update the current color fraction and wrap around if necessary. |
|
Generate an SVG contour mask based on a word cloud object and dimensions. |
|
Random color generation function. |
- default_color_func(word, font_size, position, orientation, random_state=None, **kwargs)¶
Update the current color fraction and wrap around if necessary.
- generate_contour_svg(wc, width, height)[source]¶
Generate an SVG contour mask based on a word cloud object and dimensions.
- Parameters:
wc (WordCloud) – The word cloud object.
width (int) – SVG image width in pixels.
height (int) – SVG image height in pixels.
- Returns:
SVG point list for the contour mask, or empty string if not generated.
- Return type:
str
- random_color_darker(random_state=None)[source]¶
Random color generation function.
- Parameters:
random_state (Random or None) – Previous state of random generation for next color generation.
- Returns:
Represents a hue, saturation, and lightness.
- Return type:
str
Classes
|
Represents a colormap. |