How to generate colored labels in comparison.cloud?

2

Below is an example of the code to generate the cloud :

comparison.cloud(tdm, random.order=FALSE,
                 colors = c("tomato", "wheat", "lightblue","lightgreen"))

The words are easily colored with the above command but the labels are still gray.

    
asked by anonymous 14.08.2014 / 19:08

1 answer

1

I found a solution:

I've found that to do this you need to go to source code . Just go to R-Forge or check through the console itself.

Then change a line by adding the color parameter col=colors[i] as seen below:

rect(x1-.5*wid,y1-.5*ht,x1+.5*wid,y1+.5*ht,col=colors[i], border="transparent")

And when we run the function we will have the colors of the labels changed.

Ialsoshowhowtochangecordafonte:

text(x1,y1,word,cex=title.size,col="white")
    
18.08.2014 / 17:31