ColormapColorFunc

class ColormapColorFunc(colormap='nipy_spectral', color_range=(0.0, 0.5), color_step_range=(0.15, 0.25))[source]

Methods

hed.tools.visualization.word_cloud_util.ColormapColorFunc.__init__([...])

Initialize a word cloud color generator.

hed.tools.visualization.word_cloud_util.ColormapColorFunc.color_func(...)

Attributes

ColormapColorFunc.__init__(colormap='nipy_spectral', color_range=(0.0, 0.5), color_step_range=(0.15, 0.25))[source]

Initialize a word cloud color generator.

Parameters:
  • colormap (str, optional) – The name of the matplotlib colormap to use for generating colors. Defaults to ‘nipy_spectral’.

  • color_range (tuple of float, optional) – A tuple containing the minimum and maximum values to use from the colormap. Defaults to (0.0, 0.5).

  • color_step_range (tuple of float, optional) – A tuple containing the minimum and maximum values to step through the colormap. Defaults to (0.15, 0.25). This is the speed at which it goes through the range chosen. .25 means it will go through 1/4 of the range each pick.

ColormapColorFunc.color_func(word, font_size, position, orientation, random_state=None, **kwargs)[source]