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.


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:
  • 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:
  • imagenonzero pixels of an Image object
    graphicsnonzero pixels of a rasterized Graphics object
    regionany 2D geometric RegionQ object
  • WordCloud has the same options as Graphics, with the following additions and changes:
  • BackgroundTransparentbackground color to use
    ColorFunctionAutomaticcolor based on weight and word
    ColorFunctionScalingTruewhether to scale weight argument of ColorFunction
    FontFamily"Helvetica"the family of font to use
    FontSizeAutomaticrange of font sizes
    FontTracking"Plain"the compression of characters
    FontWeightPlainthe weight of characters to use
    IgnoreCaseTruewhether to ignore case when computing multiplicities
    MaxItemsAutomaticmaximum number of words to show
    PlotRangeAutomaticrange of values to include
    PlotTheme$PlotThemeoverall theme for the plot
    PreprocessingRulesAutomatichow to pre-process specific elements
    RandomSeedingAutomaticspecify the random seed
    ScalingFunctionsIdentityscaling of the weights
    WordOrientation"Horizontal"orientation of the words to use
    WordSelectionFunctionAutomaticfunction to determine whether to include a word
    WordSpacingsAutomaticspace 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.
  • ScalingFunctions is applied to weights wi, with settings:
  • Identity,Noneno scaling function (default)
    Loglogarithmic scaling
    #^alpha&power scaling
    fuse the scaling function f
  • FontSize can be used to control font sizes from scaled weights with settings:
  • Automaticautomatically computed min and max size
    maxautomatically computed min size
    {min,max}explicit min and max size
    gexplicit mapping g between scaled weights and font size
  • 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 the words as the first argument. Optionally, the corresponding weight can be given to f as the second argument:
  • #Word or #1the word si
    #Weight or #2the weight wi


open allclose all

Basic Examples  (3)

Word cloud of weighted strings:

Click for copyable input
Click for copyable input

Tooltip every word of the word cloud:

Click for copyable input
Click for copyable input

Create a word cloud using a given shape:

Click for copyable input
Click for copyable input

Scope  (6)

Options  (25)

Applications  (8)

Properties & Relations  (2)

Possible Issues  (1)

Interactive Examples  (1)

Neat Examples  (1)

See Also

ImageCollage  Snippet  Text  Counts  WordCounts  LetterCounts  WordFrequency  Tally  ToUpperCase  ToLowerCase  StringCases  TextCases  WordData  BubbleChart

Related Workflows

Introduced in 2015
| Updated in 2017