powered by
Plot a wordcloud with words ordered and coloured according to a dimension (x)
plot_words( x, y = NULL, words, wordfreq = rep(1, length(x)), xlab = "", ylab = "", yaxt = "n", scale = 1, random.y = T, xlim = NULL, ylim = NULL, col = c("darkred", "navyblue"), fixed_col = NULL, ... )
nothing
The (approximate) x positions of the words
The (approximate) y positions of the words
A character vector with the words to plot
The frequency of the words, defaulting to 1
Label of the x axis
Label of the y axis
see par documentation
par
Maximum size to scale the wordsize
if TRUE, the y position of words is random, otherwise it represents the word frequency.
Starting value of x axis
Starting value of y axis
A vector of colors that is passed to colorRamp to interpolate colors over x axis
Optionally, a vector of the exact colors given to words.
additional parameters passed to the plot function
x = c(-10, -5, 3, 5) y = c(0, 2, 5, 10) words = c('words', 'where', 'you', 'like') # \donttest{ plot_words(x,y,words, c(1,2,3,4)) # }
Run the code above in your browser using DataLab