Description Usage Arguments Details Author(s) Examples
General grid
based wordcloud drawing function
1 2 3 4 5 |
words |
vector of words to draw |
freq |
frequencies for words, has to be the same length as words vector |
rot.per |
percentage of vertical words |
max_min |
relative scales to adjust the size difference between largest and smallest word, by default the largest word is written with 10 times as large font than the smallest |
scale |
a fraction of the available space on figure that will be covered with the bounding boxes of words |
min.freq |
minimal frequency of words to be displayed |
max.words |
maximal number of words to be displayed |
random.order |
plot words in random order. If false, they will be plotted in decreasing frequency |
colors |
vector of colors fro the words. This vector will be extrapolated into as many colors as needed, starting with the first color for lower frequencies and ending with last color for higher frequencies. |
random.colors |
if true, assigns random color for the words. |
fontface |
fontface for the words (1 - regular; 2 - Bold; 3 - italic) |
algorithm |
algorithm to find positions of words possible values: "circle", "leftside" and "rightside". |
tryfit |
if TRUE the algorithm checks if all words fit to the figure, if not it tries gradually smaller values of scale parameter until everything fits |
add |
if TRUE adds the picture to existing plot. |
grob |
if TRUE returns the text grob instead of drawing it |
dimensions |
a two element vector of units giving the width and height of the word cloud respectively |
Uses the algorithm from wordcloud package to calculate the positions of the words. It then uses grid graphics to plot the words on screen. The shape of the wordcloud depends on the shape of the plotting window
Raivo Kolde <raivo.kolde@eesti.ee>
1 | plotWordcloud(c("Audi", "Volkswagen", "Opel", "Porsche", "Mercedez", "BMW"), 8:3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.