WOLFRAM

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

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Word cloud of weighted strings:

Out[3]=3

Tooltip every word of the word cloud:

Out[2]=2

Create a word cloud using a given shape:

Out[2]=2

Scope  (6)Survey of the scope of standard use cases

Data  (4)

Word cloud of a list of strings:

Out[1]=1

Word cloud of a list of strings and weights:

Out[1]=1

Word cloud of an association:

Out[1]=1

Word cloud of a single string:

Out[1]=1

Shape  (1)

Create a word cloud of country names weighted by their area:

By default, WordCloud attempts to create a cloud of a rectangular shape:

Out[2]=2

Define the shape using Graphics primitives:

Out[3]=3

Define the shape as a region:

Out[5]=5
Out[6]=6

Use disconnected regions:

Out[8]=8
Out[9]=9

Presentation  (1)

Words are automatically styled to be distinct:

Out[10]=10

Change the font:

Out[11]=11

Change style for a particular word:

Out[12]=12

Change the color function:

Out[13]=13

Change the background color:

Out[8]=8

Use a plot theme:

Out[9]=9

Create a monochrome word cloud:

Out[14]=14

Options  (25)Common values & functionality for each option

Background  (1)

The default background of the word cloud is transparent:

Out[2]=2

Specify a different color:

Out[3]=3

ColorFunction  (1)

The default color function is ColorData["DarkRainbow"]:

Out[2]=2

Use a custom color function:

Out[3]=3

Use a single color:

Out[4]=4

Use shades of a single color:

Out[5]=5

Pick random colors from a specified color gradient:

Out[6]=6

ColorFunctionScaling  (2)

By default, weights are scaled to fit in the range 0 and 1:

Out[1]=1
Out[2]=2
Out[3]=3

Scaled weights are not suitable when used with indexed colors:

Out[1]=1
Out[2]=2

Use ColorFunctionScaling->False:

Out[3]=3

FontFamily  (1)

The default font family used is "Source Sans Pro":

Out[1]=1

Use a different font family:

Out[2]=2

FontSize  (4)

The default font size range is computed automatically:

Out[2]=2

Rescale to the specified maximum font size:

Out[1]=1

Rescale the fonts between a minimum and a maximum size:

Out[1]=1

Specify a custom mapping between weights and font size:

Out[1]=1

FontTracking  (1)

The default is FontTracking->"Plain":

Out[2]=2

Use a more expanded setting:

Out[3]=3

FontWeight  (1)

The font weight is Plain by default:

Out[2]=2

Use bold fonts:

Out[3]=3

IgnoreCase  (3)

By default, cases are ignored:

Out[1]=1

Differentiate between uppercase and lowercase letters:

Out[3]=3

With weighted strings and IgnoreCase->True, the total weight of the identical words is used:

Out[1]=1

With IgnoreCase->True, each word appears using the capitalization of its first occurrence:

Out[2]=2

ImageSize  (1)

ImageSize controls the display size only. The default display size is computed automatically:

Out[3]=3

Specify a different display size:

Out[6]=6

MaxItems  (1)

By default, up to 100 elements are shown in the cloud:

Out[3]=3

Specify a different amount:

Out[4]=4
Out[5]=5

PlotTheme  (1)

Create a word cloud with a specific theme:

Out[2]=2

PreprocessingRules  (3)

Specify the default processing rules:

Out[2]=2

Default styles are used for any word that is not preprocessed:

Out[1]=1

Perform spell correction before displaying strings:

Out[1]=1

ScalingFunctions  (1)

By default, font sizes are computed directly from the weights:

Out[2]=2

Use logarithmic scaling:

Out[3]=3

Use inverted weights to highlight countries with small populations:

Out[6]=6

WordOrientation  (1)

A word cloud with random orientations:

Out[3]=3

Randomly select from two given orientations:

Out[4]=4

WordSelectionFunction  (2)

Select strings based on their length:

Out[1]=1

By default, elements are selected based on decreasing weight order up to the MaxItems value:

Out[2]=2

Use a custom selection function:

Out[3]=3

Include the element weight in the selection criterion:

Out[4]=4

WordSpacings  (1)

By default, a small space is inserted between words to make them more readable:

Out[2]=2

Use minimal spacing:

Out[3]=3

Specify the spacing:

Out[4]=4

Applications  (8)Sample problems that can be solved with this function

Basic Applications  (4)

Summarize a webpage in a word cloud:

Out[1]=1

Summarize a piece of text:

Out[2]=2

Put selected words in the shape of the US map:

Out[3]=3

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:

Out[3]=3

Compute and visualize different identifications of an image:

Out[1]=1

Use probabilities as weights when forming the word cloud:

Out[2]=2

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:

Out[5]=5

Language Analysis  (3)

Visualize the frequency of the characters in the built-in dictionary:

Out[2]=2
Out[3]=3

The first 50 trigrams in the English version of the Aeneid:

Out[2]=2

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:

Out[4]=4

Properties & Relations  (2)Properties of the function, and connections to other functions

By default, a single string is processed using TextWords and DeleteStopwords:

Out[2]=2
Out[3]=3

Explicitly split the words to avoid deletion of stopwords:

Out[4]=4

By default, the capitalization of words is preserved. With multiple occurrences, the first instance is used:

Out[2]=2

Use all uppercase characters:

Out[3]=3

Use all lowercase characters:

Out[4]=4

Possible Issues  (1)Common pitfalls and unexpected behavior

By default, stopwords are deleted when a string is used as input:

Out[2]=2

Split the string beforehand to keep all the words:

Out[3]=3

Interactive Examples  (1)Examples with interactive outputs

Word cloud animation of country populations over about three centuries:

Out[4]=4

Neat Examples  (1)Surprising or curious use cases

Word cloud of an expression:

Out[3]=3
Wolfram Research (2015), WordCloud, Wolfram Language function, https://reference.wolfram.com/language/ref/WordCloud.html (updated 2017).
Wolfram Research (2015), WordCloud, Wolfram Language function, https://reference.wolfram.com/language/ref/WordCloud.html (updated 2017).

Text

Wolfram Research (2015), WordCloud, Wolfram Language function, https://reference.wolfram.com/language/ref/WordCloud.html (updated 2017).

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.

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

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: 01-April-2025 ]}

@misc{reference.wolfram_2025_wordcloud, author="Wolfram Research", title="{WordCloud}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/WordCloud.html}", note=[Accessed: 01-April-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: 01-April-2025 ]}

@online{reference.wolfram_2025_wordcloud, organization={Wolfram Research}, title={WordCloud}, year={2017}, url={https://reference.wolfram.com/language/ref/WordCloud.html}, note=[Accessed: 01-April-2025 ]}