WOLFRAM

Iconize[expr]

gives an iconized form that can be used to stand in for expr in notebook input.

Iconize[expr,"name"]

displays with the specified name in the icon.

Details and Options

  • The formatted output of Iconize[expr] will evaluate to expr when it is supplied as input.
  • It is common to evaluate Iconize[expr] using Evaluate in Place.
  • On many platforms, an expression selected in a notebook can be iconized using the Iconize menu item in the context menu for the selection.
  • An iconized form can be converted to standard form using Convert to StandardForm.
  • With the default setting Method->Automatic, the expression is written as is into the notebook.
  • With the settings Method->Compress and Method->BinarySerialize, the respective functions are used to compress the expression prior to writing it into the notebook.

Examples

open allclose all

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

Create an icon that holds the numbers 1 through 100:

Out[1]=1

The icon evaluates to the list when used as input:

Create a named icon:

Out[1]=1

The icon can also be used as input:

Out[2]=2

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

Iconize strings:

Out[1]=1

Iconize associations:

Out[1]=1

Iconize a general expression:

Out[1]=1

Create named icons:

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

Use the icons in an expression:

Out[3]=3

Iconize an unevaluated expression:

Out[1]=1

The icon contains the unevaluated expression:

Out[2]=2

Outside of a holding construct, normal evaluation occurs:

Out[3]=3

Options  (1)Common values & functionality for each option

Method  (1)

Create data:

Iconize the data, storing a reference to the output cell for later:

Out[2]=2

Iconize the data but compress it using Compress:

Out[3]=3

Iconize the data but compress it using BinarySerialize:

Out[4]=4

Verify that the sizes of the second and third icons in the notebook are indeed smaller:

Out[5]=5

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

Iconize evaluates its argument:

Out[1]=1

Interpretation allows you to specify an arbitrary appearance of an expression:

Out[1]=1

The expression is not evaluated by default:

Out[2]=2

Iconize has a unique appearance and evaluates its argument by default:

Out[3]=3
Out[4]=4

Possible Issues  (2)Common pitfalls and unexpected behavior

The typeset output produced by Iconize is not the same as the result of evaluation:

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

The typeset output evaluates to the first argument of the result:

Out[3]=3

When using compression, the iconized form may not be fully equivalent to the original expression:

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

When used inside functions that hold their arguments, the altered expression can be seen:

Out[3]=3

The original expression is recovered when the iconized form fully evaluates:

Out[4]=4
Wolfram Research (2018), Iconize, Wolfram Language function, https://reference.wolfram.com/language/ref/Iconize.html (updated 2019).
Wolfram Research (2018), Iconize, Wolfram Language function, https://reference.wolfram.com/language/ref/Iconize.html (updated 2019).

Text

Wolfram Research (2018), Iconize, Wolfram Language function, https://reference.wolfram.com/language/ref/Iconize.html (updated 2019).

Wolfram Research (2018), Iconize, Wolfram Language function, https://reference.wolfram.com/language/ref/Iconize.html (updated 2019).

CMS

Wolfram Language. 2018. "Iconize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/Iconize.html.

Wolfram Language. 2018. "Iconize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/Iconize.html.

APA

Wolfram Language. (2018). Iconize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Iconize.html

Wolfram Language. (2018). Iconize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Iconize.html

BibTeX

@misc{reference.wolfram_2025_iconize, author="Wolfram Research", title="{Iconize}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/Iconize.html}", note=[Accessed: 29-March-2025 ]}

@misc{reference.wolfram_2025_iconize, author="Wolfram Research", title="{Iconize}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/Iconize.html}", note=[Accessed: 29-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_iconize, organization={Wolfram Research}, title={Iconize}, year={2019}, url={https://reference.wolfram.com/language/ref/Iconize.html}, note=[Accessed: 29-March-2025 ]}

@online{reference.wolfram_2025_iconize, organization={Wolfram Research}, title={Iconize}, year={2019}, url={https://reference.wolfram.com/language/ref/Iconize.html}, note=[Accessed: 29-March-2025 ]}