Coloring a tag cloud with color manager node based on term frequency AND tags

Dear Knime community,
I’m trying to color a tag cloud in the following way:

  • first, I’d like to color the words based on their term frequency (using TF node) in grayscale (I’m using the “TF” column with the “range” in a color manager node);

  • then, I’d like to build upon these colors by making some words RED (the words that have a specific TAG applied - I’m using the “NE” column with the “nominal” in another color manager node);

I can color the tag cloud with either ONE set of colors, or the OTHER; I am using two separate color nodes; my question is:

  • is this possible?
  • can I “merge” the colors from the 2 color manager nodes and pass the result to the tag cloud node?
  • should / can I use just one color manager node?



as far as I know it is not possible to merge the colors from two color manager node.

What might be a work around for you, is to use the Auto-Binner node to create bins based on the frequency. Change the bin for the words you want to color in red and then choose different greys for the different bins and red for your tagged words.


Thanks for helping out. Can you please elaborate? I’ve tried using the (several) Binning components but I am not sure on how to make the connections. Should I connect the Auto-Binner to the TF node (to process its table with frequencies assigned?). But how to deal with tagged words? Thank you.


of course! Happy to help :slight_smile:

  1. Use the TF node
  2. Use Auto-Binner node on the TF column
  3. Use Tags to String node to extract the tags
  4. Now you have many options:
    4.1. Use Row Splitter node and split on whether the word should be red or not. Then change the bin values to tagged for the once you want to have in red. Therefore you could delete the Bin column, use the Constant Value Column node and then the Column Rename node, to make sure that the column header is equivalent to the column header of the column with the bins. Last use a concatenate node.
    4.2. Use the Rule Engine node and whenever the word should be red replace the bin column with the value tagged.
  5. Apply the color manager.

I hope that helps!


Thanks, will try and sort this out :slight_smile: