WordCloud
✖
WordCloud
generates a word cloud graphic in which the si are sized according to their multiplicity in the list.
generates a word cloud in which the si are sized according to the weights wi.
also generates a word cloud in which the si are sized according to the weights wi.
also generates a word cloud in which the si are sized according to the weights wi.
also generates a word cloud in which the si are sized according to the weights wi.
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:
-
Annotation[si,label] provide an annotation Button[si,action] define an action to execute when clicked EventHandler[si,…] define a general event handler Hyperlink[si,uri] create a hyperlink PopupWindow[si,cont] attach a popup window Rotate[si,θi] rotate by θi radians StatusArea[si,label] display in the status area when moused over Style[si,…] show using the specified styles Tooltip[si,label] attach an arbitrary tooltip - 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 object graphics nonzero pixels of a rasterized Graphics object region any 2D geometric RegionQ object - WordCloud has the same options as Graphics, with the following additions and changes: [List of all options]
-
Background Transparent background color to use ColorFunction Automatic color based on weight and word ColorFunctionScaling True whether to scale weight argument of ColorFunction FontFamily "Helvetica" the family of font to use FontSize Automatic range of font sizes FontTracking "Plain" the compression of characters FontWeight Plain the weight of characters to use IgnoreCase True whether to ignore case when computing multiplicities MaxItems Automatic maximum number of words to show PlotRange Automatic range of values to include PlotTheme $PlotTheme overall theme for the plot PreprocessingRules Automatic how to pre-process specific elements RandomSeeding Automatic specify the seeding for random word orientation ScalingFunctions Identity scaling of the weights WordOrientation "Horizontal" orientation of the words to use WordSelectionFunction Automatic function to determine whether to include a word WordSpacings Automatic space to add around each word - With ImageSizeAutomatic, 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 range max explicit max size and automatic min size {min,max} explicit min and max size g 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 -
AlignmentPoint Center the default point in the graphic to align with AspectRatio Automatic ratio of height to width Axes False whether to draw axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} style specifications for the axes Background Transparent background color to use BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic ColorFunction Automatic color based on weight and word ColorFunctionScaling True whether to scale weight argument of ColorFunction ContentSelectable Automatic whether to allow contents to be selected CoordinatesToolOptions Automatic detailed behavior of the coordinates tool Epilog {} primitives rendered after the main plot FontFamily "Helvetica" the family of font to use FontSize Automatic range of font sizes FontTracking "Plain" the compression of characters FontWeight Plain the weight of characters to use FormatType TraditionalForm the default format type for text Frame False whether to put a frame around the plot FrameLabel None frame labels FrameStyle {} style specifications for the frame FrameTicks Automatic frame ticks FrameTicksStyle {} style specifications for frame ticks GridLines None grid lines to draw GridLinesStyle {} style specifications for grid lines IgnoreCase True whether to ignore case when computing multiplicities ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels etc. ImageSize Automatic the absolute size at which to render the graphic LabelStyle {} style specifications for labels MaxItems Automatic maximum number of words to show Method Automatic details of graphics methods to use PlotLabel None an overall label for the plot PlotRange Automatic range of values to include PlotRangeClipping False whether to clip at the plot range PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic the final display region to be filled PlotTheme $PlotTheme overall theme for the plot PreprocessingRules Automatic how to pre-process specific elements PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} primitives rendered before the main plot RandomSeeding Automatic specify the seeding for random word orientation RotateLabel True whether to rotate y labels on the frame ScalingFunctions Identity scaling of the weights Ticks Automatic axes ticks TicksStyle {} style specifications for axes ticks WordOrientation "Horizontal" orientation of the words to use WordSelectionFunction Automatic function to determine whether to include a word WordSpacings Automatic space to add around each word
List of all options




Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Word cloud of weighted strings:

https://wolfram.com/xid/0b8emadc5t-532pz6

https://wolfram.com/xid/0b8emadc5t-0sj2cz

Tooltip every word of the word cloud:

https://wolfram.com/xid/0b8emadc5t-ux0542

https://wolfram.com/xid/0b8emadc5t-1n74gu

Create a word cloud using a given shape:

https://wolfram.com/xid/0b8emadc5t-y0zxv0

https://wolfram.com/xid/0b8emadc5t-6gj6ez

Scope (6)Survey of the scope of standard use cases
Data (4)
Word cloud of a list of strings:

https://wolfram.com/xid/0b8emadc5t-zpkqta

Word cloud of a list of strings and weights:

https://wolfram.com/xid/0b8emadc5t-pi40xd


https://wolfram.com/xid/0b8emadc5t-3vaeqw

Word cloud of a single string:

https://wolfram.com/xid/0b8emadc5t-qah7o6

Shape (1)
Create a word cloud of country names weighted by their area:

https://wolfram.com/xid/0b8emadc5t-bejsol
By default, WordCloud attempts to create a cloud of a rectangular shape:

https://wolfram.com/xid/0b8emadc5t-kebsxk

Define the shape using Graphics primitives:

https://wolfram.com/xid/0b8emadc5t-8pl9mh


https://wolfram.com/xid/0b8emadc5t-vrrfuz


https://wolfram.com/xid/0b8emadc5t-me152s


https://wolfram.com/xid/0b8emadc5t-dl6q04


https://wolfram.com/xid/0b8emadc5t-grqvb7

Presentation (1)
Words are automatically styled to be distinct:

https://wolfram.com/xid/0b8emadc5t-4uomfv

https://wolfram.com/xid/0b8emadc5t-uoawtx


https://wolfram.com/xid/0b8emadc5t-4t8mwq

Change style for a particular word:

https://wolfram.com/xid/0b8emadc5t-je66rq


https://wolfram.com/xid/0b8emadc5t-mth3gx


https://wolfram.com/xid/0b8emadc5t-xtatkz


https://wolfram.com/xid/0b8emadc5t-uu37ws

Create a monochrome word cloud:

https://wolfram.com/xid/0b8emadc5t-2k1h19

Options (25)Common values & functionality for each option
Background (1)
ColorFunction (1)
The default color function is ColorData["DarkRainbow"]:

https://wolfram.com/xid/0b8emadc5t-3zy91v

https://wolfram.com/xid/0b8emadc5t-w9grhi


https://wolfram.com/xid/0b8emadc5t-qlgltt


https://wolfram.com/xid/0b8emadc5t-dymqmp


https://wolfram.com/xid/0b8emadc5t-cqiq6c

Pick random colors from a specified color gradient:

https://wolfram.com/xid/0b8emadc5t-5md3dw

ColorFunctionScaling (2)
By default, weights are scaled to fit in the range 0 and 1:

https://wolfram.com/xid/0b8emadc5t-xoy8z5


https://wolfram.com/xid/0b8emadc5t-g59u5w


https://wolfram.com/xid/0b8emadc5t-kwab5h

Scaled weights are not suitable when used with indexed colors:

https://wolfram.com/xid/0b8emadc5t-rp3tuw


https://wolfram.com/xid/0b8emadc5t-qcap6f

Use ColorFunctionScaling->False:

https://wolfram.com/xid/0b8emadc5t-0zho4f

FontFamily (1)
FontSize (4)
The default font size range is computed automatically:

https://wolfram.com/xid/0b8emadc5t-h1uof

Rescale to the specified maximum font size:

https://wolfram.com/xid/0b8emadc5t-r9z4bh

Rescale the fonts between a minimum and a maximum size:

https://wolfram.com/xid/0b8emadc5t-qtrekl

Specify a custom mapping between weights and font size:

https://wolfram.com/xid/0b8emadc5t-gdbtzc

FontTracking (1)
The default is FontTracking->"Plain":

https://wolfram.com/xid/0b8emadc5t-epyhzs


https://wolfram.com/xid/0b8emadc5t-p8odls

FontWeight (1)
The font weight is Plain by default:

https://wolfram.com/xid/0b8emadc5t-ibmvgx


https://wolfram.com/xid/0b8emadc5t-nvxfhq

IgnoreCase (3)
By default, cases are ignored:

https://wolfram.com/xid/0b8emadc5t-cqf3ec

Differentiate between uppercase and lowercase letters:

https://wolfram.com/xid/0b8emadc5t-86fyl9

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

https://wolfram.com/xid/0b8emadc5t-zfmh1w

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

https://wolfram.com/xid/0b8emadc5t-hqjcb5

https://wolfram.com/xid/0b8emadc5t-wvw4k5

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

https://wolfram.com/xid/0b8emadc5t-e45fhg

https://wolfram.com/xid/0b8emadc5t-lufrkz

Specify a different display size:

https://wolfram.com/xid/0b8emadc5t-koqs2h

MaxItems (1)
PlotTheme (1)
PreprocessingRules (3)
Specify the default processing rules:

https://wolfram.com/xid/0b8emadc5t-0agdhj

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

https://wolfram.com/xid/0b8emadc5t-o03217

Perform spell correction before displaying strings:

https://wolfram.com/xid/0b8emadc5t-ydhc96

ScalingFunctions (1)
By default, font sizes are computed directly from the weights:

https://wolfram.com/xid/0b8emadc5t-9rcday

https://wolfram.com/xid/0b8emadc5t-o23zcg


https://wolfram.com/xid/0b8emadc5t-2yz1k7

Use inverted weights to highlight countries with small populations:

https://wolfram.com/xid/0b8emadc5t-t9oyaa

WordOrientation (1)
WordSelectionFunction (2)
Select strings based on their length:

https://wolfram.com/xid/0b8emadc5t-23m8ol

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

https://wolfram.com/xid/0b8emadc5t-s8zjq2

https://wolfram.com/xid/0b8emadc5t-lh6lv4

Use a custom selection function:

https://wolfram.com/xid/0b8emadc5t-o7zney

Include the element weight in the selection criterion:

https://wolfram.com/xid/0b8emadc5t-zm8dq8

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

https://wolfram.com/xid/0b8emadc5t-mcyajj

https://wolfram.com/xid/0b8emadc5t-99cq5


https://wolfram.com/xid/0b8emadc5t-o17d7h


https://wolfram.com/xid/0b8emadc5t-nk7opx

Applications (8)Sample problems that can be solved with this function
Basic Applications (4)
Summarize a webpage in a word cloud:

https://wolfram.com/xid/0b8emadc5t-fmjfok


https://wolfram.com/xid/0b8emadc5t-np7xri

https://wolfram.com/xid/0b8emadc5t-1ri3zs

Put selected words in the shape of the US map:

https://wolfram.com/xid/0b8emadc5t-v2g7l9

Create a word cloud of all artworks of Picasso:

https://wolfram.com/xid/0b8emadc5t-7q3jh3
Extract name, area, and an image corresponding to each artwork:

https://wolfram.com/xid/0b8emadc5t-v8d34u
Create the word cloud and use images as tooltips:

https://wolfram.com/xid/0b8emadc5t-gp1sp0

Compute and visualize different identifications of an image:

https://wolfram.com/xid/0b8emadc5t-487pr5

Use probabilities as weights when forming the word cloud:

https://wolfram.com/xid/0b8emadc5t-7g6t2t

Word Selection (1)
Create a word cloud of nouns longer than two characters:

https://wolfram.com/xid/0b8emadc5t-mjjldk

https://wolfram.com/xid/0b8emadc5t-kruhoj
Extract all nouns from a dictionary:

https://wolfram.com/xid/0b8emadc5t-rlrxlu
Select input strings that are nouns longer than two characters:

https://wolfram.com/xid/0b8emadc5t-r8h232

https://wolfram.com/xid/0b8emadc5t-q302tv

Language Analysis (3)
Visualize the frequency of the characters in the built-in dictionary:

https://wolfram.com/xid/0b8emadc5t-8jnqc3


https://wolfram.com/xid/0b8emadc5t-omp9ar

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

https://wolfram.com/xid/0b8emadc5t-5jf3so

https://wolfram.com/xid/0b8emadc5t-pnamrg

Word cloud of nouns in a dictionary weighted by their number of synonyms:

https://wolfram.com/xid/0b8emadc5t-6hjyzh

https://wolfram.com/xid/0b8emadc5t-srj43s
Select words that have at least one synonym:

https://wolfram.com/xid/0b8emadc5t-h3pyed
Use the list of synonyms of each word as its tooltip:

https://wolfram.com/xid/0b8emadc5t-1gbcb2

Properties & Relations (2)Properties of the function, and connections to other functions
By default, a single string is processed using TextWords and DeleteStopwords:

https://wolfram.com/xid/0b8emadc5t-5k9tz

https://wolfram.com/xid/0b8emadc5t-jdb7n8


https://wolfram.com/xid/0b8emadc5t-w793cz

Explicitly split the words to avoid deletion of stopwords:

https://wolfram.com/xid/0b8emadc5t-38fccc

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

https://wolfram.com/xid/0b8emadc5t-yb5de9

https://wolfram.com/xid/0b8emadc5t-q9llb7


https://wolfram.com/xid/0b8emadc5t-g29i7g


https://wolfram.com/xid/0b8emadc5t-0qc0vb

Possible Issues (1)Common pitfalls and unexpected behavior
Interactive Examples (1)Examples with interactive outputs
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
]}
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
]}