is an option for graphics and sound functions that specifies a function to apply to graphics and sound objects before returning them.
DisplayFunction
is an option for graphics and sound functions that specifies a function to apply to graphics and sound objects before returning them.
Details
- The typical default setting is DisplayFunction:>$DisplayFunction.
- With a notebook front end, $DisplayFunction is normally Identity.
- DisplayFunction->(Print[#];&) prints the graphic in a separate cell.
- Show, as well as functions like Plot and Plot3D, automatically applies the function specified by the setting for DisplayFunction before returning its results.
Examples
Basic Examples (2)
Display a graphic in PopupWindow when clicked:
Show[Graphics[{Pink, Rectangle[]}], DisplayFunction -> (PopupWindow[Button["Click here"], #]&)]Display a graphic in a new notebook:
Show[Graphics[{Pink, Rectangle[]}], DisplayFunction -> CreateDocument]Tech Notes
Related Guides
History
Introduced in 1988 (1.0) | Updated in 2007 (6.0)
Text
Wolfram Research (1988), DisplayFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/DisplayFunction.html (updated 2007).
CMS
Wolfram Language. 1988. "DisplayFunction." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/DisplayFunction.html.
APA
Wolfram Language. (1988). DisplayFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DisplayFunction.html
BibTeX
@misc{reference.wolfram_2026_displayfunction, author="Wolfram Research", title="{DisplayFunction}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/DisplayFunction.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_displayfunction, organization={Wolfram Research}, title={DisplayFunction}, year={2007}, url={https://reference.wolfram.com/language/ref/DisplayFunction.html}, note=[Accessed: 12-June-2026]}