LabeledGraphicsBox

LabeledGraphicsBox[box,lbl]

is a low-level construct that represents a graphics box with a label attached to it.

LabeledGraphicsBox[box,lbl,pos]

places lbl at a position specified by pos.

LabeledGraphicsBox[box,{lbl1,lbl2,},{pos1,pos2,}]

places the lbli at positions posi.

Details and Options

  • LabeledGraphicsBox is one possible low-level representation of Labeled. Except for low-level notebook expression manipulation, LabeledGraphicsBox should not need to be used directly.
  • box must be a GraphicsBox, Graphics3DBox or a LabeledGraphicsBox.
  • Selecting a LabeledGraphicsBox will result in a graphics-style selection with resize handles that can be used to resize the whole construct.
  • Resizing a LabeledGraphicsBox will automatically resize box to use the full available space, minus the space required to draw labels.
  • Possible forms for the posi are:
  • sidecentered on the specified side
    {side,align}on the specified side with the specified alignment
  • Possible forms for side include Bottom, Left, Top, Right.
  • Possible forms for align include Center, Left, Right, Bottom, Top.
  • The effective default for pos is normally Bottom.
  • The following options can be given:
  • BaselinePosition Automaticthe position of the base line for the box
    BaseStyle "LabeledGraphics"base style specifications for the whole box
    DefaultLabelStyle"LabeledGraphicsLabel"base style specifications for the whole box
    ImageMargins 0margins to add outside the display area
    ImageSize Automaticthe overall image size of the box
    LabelStyle Automaticstyle specification for the lbli
    Spacings Automatichorizontal and vertical label spacings
  • ImageSizeAutomatic will cause LabeledGraphicsBox to display box at its specified size and add additional space as needed to fit the lbli. Other values will set the absolute size of the entire construct and resize box automatically to fit in the available space.
  • LabeledGraphicsBox is used in the typesetting of some Labeled constructs.

Examples

open allclose all

Basic Examples  (4)

A 2D labeled graphic:

A 3D labeled graphic:

Label positioned at the left of a graphic:

A label on the left and a label at the top:

Scope  (15)

Label Content  (6)

Label a graphic:

Label a 3D graphic:

Use a checkbox as a label:

Use a checkbox as a label for a 3D graphic:

Use graphics as labels:

Use 3D graphics as labels:

Label Placement  (4)

Control the placement of labels:

Place the label at the bottom, aligned to the left:

Put the label on the right, aligned to the top:

A label on the right aligned to the top compared to a label at the top aligned to the right:

Box Usage  (5)

Create a nested LabeledGraphicsBox:

Use a LabeledGraphicsBox as a label:

Use multiple levels of nested LabeledGraphicsBox instances using nested LabeledGraphicsBox instances as labels:

Use LabeledGraphicsBox as an Inset:

Use LabeledGraphicsBox as an Inset in a 3D graphic:

Options  (15)

Background  (1)

Change the overall background color:

BaselinePosition  (1)

Align with surrounding text:

BaseStyle  (1)

Set the starting style:

ContentSelectable  (1)

By default, editing of labels and expressions is allowed:

Disallow editing:

ImageMargins  (1)

Add margins around the labeled expression:

Specify different margins for each side:

ImageSize  (1)

The image size by default is the size of the inner graphic plus the space for the labels:

Giving explicit values to ImageSize resizes the inner graphic to fill the available space:

ImageSize resizes the inner graphic even if it has an explicitly larger size:

LabelStyle  (1)

Style the labels:

RotateLabel  (4)

Specify that the label should be rotated:

Rotate the label to a particular angle in degrees:

Rotate the label to a particular angle using radians:

Specify custom rotations for the different labels:

Rotate nested labels:

Spacings  (4)

Add horizontal spacing between the expression and the label:

Specify vertical spacing:

Use both vertical and horizontal spacing:

Dynamically update the rotation of the labels:

Applications  (2)

Label images with checkboxes, potentially for later processing:

Create an active label:

Wolfram Research (2025), LabeledGraphicsBox, Wolfram Language function, https://reference.wolfram.com/language/ref/LabeledGraphicsBox.html.

Text

Wolfram Research (2025), LabeledGraphicsBox, Wolfram Language function, https://reference.wolfram.com/language/ref/LabeledGraphicsBox.html.

CMS

Wolfram Language. 2025. "LabeledGraphicsBox." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LabeledGraphicsBox.html.

APA

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

BibTeX

@misc{reference.wolfram_2025_labeledgraphicsbox, author="Wolfram Research", title="{LabeledGraphicsBox}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/LabeledGraphicsBox.html}", note=[Accessed: 15-February-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_labeledgraphicsbox, organization={Wolfram Research}, title={LabeledGraphicsBox}, year={2025}, url={https://reference.wolfram.com/language/ref/LabeledGraphicsBox.html}, note=[Accessed: 15-February-2025 ]}