({{, (RefLink[DisplayFunction, paclet:ref/DisplayFunction])
is an option for graphics and sound functions that specifies a function to apply to graphics and sound objects before returning them.}})

OpenersNotesSection(Spacer1)Details

The typical default setting is DisplayFunction:>(RefLink[$DisplayFunction, paclet:ref/$DisplayFunction]).

With a notebook front end, (RefLink[$DisplayFunction, paclet:ref/$DisplayFunction]) is normally (RefLink[Identity, paclet:ref/Identity]).

(RefLink[DisplayFunction, paclet:ref/DisplayFunction])->((RefLink[Print, paclet:ref/Print])[#];&) prints the graphic in a separate cell.

(RefLink[Show, paclet:ref/Show]), as well as functions like (RefLink[Plot, paclet:ref/Plot]) and (RefLink[Plot3D, paclet:ref/Plot3D]), automatically applies the function specified by the setting for (RefLink[DisplayFunction, paclet:ref/DisplayFunction]) before returning its results.

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Display a graphic in (RefLink[PopupWindow, paclet:ref/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]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[$DisplayFunction, paclet:ref/$DisplayFunction])  ▪  (RefLink[Show, paclet:ref/Show])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Options for Graphics, paclet:tutorial/Options])}, {▪(RefLinkPlain[Graphics and Sound, paclet:tutorial/GraphicsAndSoundOverview])}})}})