WordCloud [{s1,s2,…}]
generates a word cloud graphic in which the si are sized according to their multiplicity in the list.
WordCloud [{w1s1,…}]
generates a word cloud in which the si are sized according to the weights wi.
WordCloud [s1w1,…]
also generates a word cloud in which the si are sized according to the weights wi.
WordCloud [{w1,w2,…}{s1,s2,…}]
also generates a word cloud in which the si are sized according to the weights wi.
WordCloud [{{s1,w1},{s2,w2},…}]
also generates a word cloud in which the si are sized according to the weights wi.
WordCloud [data,shape]
fits the word cloud into the region defined by shape.
WordCloud
WordCloud [{s1,s2,…}]
generates a word cloud graphic in which the si are sized according to their multiplicity in the list.
WordCloud [{w1s1,…}]
generates a word cloud in which the si are sized according to the weights wi.
WordCloud [s1w1,…]
also generates a word cloud in which the si are sized according to the weights wi.
WordCloud [{w1,w2,…}{s1,s2,…}]
also generates a word cloud in which the si are sized according to the weights wi.
WordCloud [{{s1,w1},{s2,w2},…}]
also generates a word cloud in which the si are sized according to the weights wi.
WordCloud [data,shape]
fits the word cloud into the region defined by shape.
Details and Options
- Word clouds are also known as tag clouds and are often used to visualize popularity of phrases or words in a given context.
- The si can be strings or any other expression. They are rendered in the word cloud however they would normally be displayed.
- WordCloud returns a Graphics object where each object si is displayed with linear dimensions proportional to its weight.
- WordCloud ["string"] generates a word cloud of the words in "string".
- Each of the si can be given a symbol wrapper, which affects its behavior or rendering:
-
- Data not given in the form above is taken to be missing and will be ignored.
- The cloud shape mask can be given in the following forms:
-
image nonzero pixels of an Image objectgraphics nonzero pixels of a rasterized Graphics objectregion any 2D geometric RegionQ object
- WordCloud has the same options as Graphics , with the following additions and changes: [List of all options]
-
- With ImageSize Automatic , the actual font sizes used are specified by FontSize , and the computed ImageSize will vary to fit the word cloud.
- With ImageSize fully specified, rescaled font sizes are used so that the resulting word cloud will fit in the specified image size.
- FontSize can be used to control font sizes from scaled weights with settings:
-
Automatic automatic size rangemax explicit max size and automatic min size{min,max} explicit min and max sizeg explicit mapping function g »
- PreprocessingRules can be used to specify how to transform individual words. If the weights are not specified, the preprocessing happens before counting.
- Using WordSelectionFunction->f, the function f takes a word as its first argument and that word's weight as its second argument: »
-
#Word or #1 the word si#Weight or #2 the weight wi
-
FontFamily "Helvetica" the family of font to useFontTracking "Plain" the compression of charactersImageMargins 0. the margins to leave around the graphicPreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphicWordOrientation "Horizontal" orientation of the words to use
List of all options
Examples
open all close allBasic Examples (3)
Word cloud of weighted strings:
Tooltip every word of the word cloud:
Create a word cloud using a given shape:
Scope (6)
Data (4)
Word cloud of a list of strings:
Word cloud of a list of strings and weights:
Word cloud of an association:
Word cloud of a single string:
Shape (1)
Presentation (1)
Words are automatically styled to be distinct:
Change the font:
Change style for a particular word:
Change the color function:
Change the background color:
Use a plot theme:
Create a monochrome word cloud:
Options (25)
Background (1)
The default background of the word cloud is transparent:
Specify a different color:
ColorFunction (1)
The default color function is ColorData ["DarkRainbow"]:
Use a custom color function:
Use a single color:
Use shades of a single color:
Pick random colors from a specified color gradient:
ColorFunctionScaling (2)
By default, weights are scaled to fit in the range 0 and 1:
Scaled weights are not suitable when used with indexed colors:
Use ColorFunctionScaling->False :
FontFamily (1)
The default font family used is "Source Sans Pro":
Use a different font family:
FontSize (4)
The default font size range is computed automatically:
Rescale to the specified maximum font size:
Rescale the fonts between a minimum and a maximum size:
Specify a custom mapping between weights and font size:
FontTracking (1)
The default is FontTracking->"Plain":
Use a more expanded setting:
FontWeight (1)
The font weight is Plain by default:
Use bold fonts:
IgnoreCase (3)
By default, cases are ignored:
Differentiate between uppercase and lowercase letters:
With weighted strings and IgnoreCase->True , the total weight of the identical words is used:
With IgnoreCase->True , each word appears using the capitalization of its first occurrence:
ImageSize (1)
ImageSize controls the display size only. The default display size is computed automatically:
Specify a different display size:
MaxItems (1)
By default, up to 100 elements are shown in the cloud:
Specify a different amount:
PlotTheme (1)
Create a word cloud with a specific theme:
PreprocessingRules (3)
Specify the default processing rules:
Default styles are used for any word that is not preprocessed:
Perform spell correction before displaying strings:
ScalingFunctions (1)
By default, font sizes are computed directly from the weights:
Use logarithmic scaling:
Use inverted weights to highlight countries with small populations:
WordOrientation (1)
A word cloud with random orientations:
Randomly select from two given orientations:
WordSelectionFunction (2)
Select strings based on their length:
By default, elements are selected based on decreasing weight order up to the MaxItems value:
Use a custom selection function:
Include the element weight in the selection criterion:
WordSpacings (1)
By default, a small space is inserted between words to make them more readable:
Use minimal spacing:
Specify the spacing:
Applications (8)
Basic Applications (4)
Summarize a webpage in a word cloud:
Summarize a piece of text:
Put selected words in the shape of the US map:
Create a word cloud of all artworks of Picasso:
Extract name, area, and an image corresponding to each artwork:
Create the word cloud and use images as tooltips:
Compute and visualize different identifications of an image:
Use probabilities as weights when forming the word cloud:
Word Selection (1)
Create a word cloud of nouns longer than two characters:
Split the input:
Extract all nouns from a dictionary:
Select input strings that are nouns longer than two characters:
Language Analysis (3)
Visualize the frequency of the characters in the built-in dictionary:
The first 50 trigrams in the English version of the Aeneid:
Word cloud of nouns in a dictionary weighted by their number of synonyms:
Select words that have at least one synonym:
Use the list of synonyms of each word as its tooltip:
Properties & Relations (2)
By default, a single string is processed using TextWords and DeleteStopwords :
Explicitly split the words to avoid deletion of stopwords:
By default, the capitalization of words is preserved. With multiple occurrences, the first instance is used:
Use all uppercase characters:
Use all lowercase characters:
Possible Issues (1)
By default, stopwords are deleted when a string is used as input:
Split the string beforehand to keep all the words:
Interactive Examples (1)
Word cloud animation of country populations over about three centuries:
Neat Examples (2)
Create a word cloud of HTML colors, using their colors and saturation as the weight:
Create a psychological Stroop effect:
Word cloud of an expression:
See Also
ImageCollage Snippet Text Counts WordCounts LetterCounts WordFrequency Tally ToUpperCase ToLowerCase StringCases TextCases WordData BubbleChart
Function Repository: WordWeave WebpageWordCloud
Related Guides
Related Workflows
- Analyze the Text on a Webpage
Text
Wolfram Research (2015), WordCloud, Wolfram Language function, https://reference.wolfram.com/language/ref/WordCloud.html (updated 2017).
CMS
Wolfram Language. 2015. "WordCloud." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/WordCloud.html.
APA
Wolfram Language. (2015). WordCloud. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WordCloud.html
BibTeX
@misc{reference.wolfram_2025_wordcloud, author="Wolfram Research", title="{WordCloud}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/WordCloud.html}", note=[Accessed: 24-November-2025]}
BibLaTeX
@online{reference.wolfram_2025_wordcloud, organization={Wolfram Research}, title={WordCloud}, year={2017}, url={https://reference.wolfram.com/language/ref/WordCloud.html}, note=[Accessed: 24-November-2025]}