displays as an overlay of all the expri.


displays as an overlay of expri, exprj, .


allows selections to be made and controls to be clicked in exprs.

Details and Options

  • The expri can be graphics, text, or any other expressions.
  • In Overlay[{expr1,expr2,}] the later expri are rendered on top of earlier ones.
  • Overlay[exprs] is equivalent to Overlay[exprs,All,None] and displays as an overlay of all the exprs.
  • Overlay[exprs] by default allows no selection within the exprs.
  • The following options can be given:
  • Alignment{Automatic,Automatic}how to align objects in the display area
    BackgroundNonebackground color to use
    BaselinePositionAutomaticwhat to align with a surrounding text baseline
    BaseStyle{}base style specifications for the displayed object
    ContentPaddingTruewhether to shrink the margins tightly around the contents
    FrameMarginsAutomaticmargins to leave inside the overall frame
    ImageMargins0margins around the image of the displayed object
    ImageSizeAllthe overall image size for the displayed object
  • With the default option setting ImageSize->All, Overlay always leaves space for the largest of the expri to be displayed, so that its overall size does not change.
  • With the option setting ImageSize->Automatic, Overlay leaves space only for the expri currently being displayed.
  • The settings for BaseStyle are appended to the default style given by the "Overlay" style in the current stylesheet.


open all close all

Basic Examples  (2)

Overlay two expressions:

Click for copyable input

Overlay two graphics:

Click for copyable input

Scope  (5)

Generalizations & Extensions  (1)

Options  (3)

Applications  (3)

Possible Issues  (1)

Neat Examples  (2)

Introduced in 2010