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

Examples

open allclose all

Basic 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)

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

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

Define the shape using Graphics primitives:

Define the shape as a region:

Use disconnected regions:

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  (1)

Word cloud of an expression:

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).

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

BibLaTeX

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