---
title: "Inset"
language: "en"
type: "Symbol"
summary: "Inset[obj] represents an object obj inset in a graphic. Inset[obj, pos] specifies that the inset should be placed at position pos in the graphic. Inset[obj, pos, opos] aligns the inset so that position opos in the object lies at position pos in the enclosing graphic. Inset[obj, pos, opos, size] specifies the size of the inset in the coordinate system of the enclosing graphic. Inset[obj, pos, opos, size, dirs] specifies that the axes of the inset should be oriented in directions dirs."
keywords: 
- inset graphic into graphics
- inset text into graphics
- inset 3D graphics into graphics
- transforming graphics
- picture in picture
- inset pictures
- collages
- subplot
canonical_url: "https://reference.wolfram.com/language/ref/Inset.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Combining Graphics"
    link: "https://reference.wolfram.com/language/guide/CombiningGraphics.en.md"
  - 
    title: "Annotating & Combining Graphics"
    link: "https://reference.wolfram.com/language/guide/AnnotatingAndCombiningGraphics.en.md"
  - 
    title: "Dynamic Graphics Elements"
    link: "https://reference.wolfram.com/language/guide/DynamicGraphicsElements.en.md"
  - 
    title: "Graphics Objects"
    link: "https://reference.wolfram.com/language/guide/GraphicsObjects.en.md"
  - 
    title: "Symbolic Graphics Language"
    link: "https://reference.wolfram.com/language/guide/SymbolicGraphicsLanguage.en.md"
  - 
    title: "Graphics Options & Styling"
    link: "https://reference.wolfram.com/language/guide/GraphicsOptionsAndStyling.en.md"
related_workflows: 
  - 
    title: "Inset One Graphic into Another"
    link: "https://reference.wolfram.com/language/workflow/InsetOneGraphicIntoAnother.en.md"
related_functions: 
  - 
    title: "GraphicsGroup"
    link: "https://reference.wolfram.com/language/ref/GraphicsGroup.en.md"
  - 
    title: "Item"
    link: "https://reference.wolfram.com/language/ref/Item.en.md"
  - 
    title: "Graphics"
    link: "https://reference.wolfram.com/language/ref/Graphics.en.md"
  - 
    title: "Graphics3D"
    link: "https://reference.wolfram.com/language/ref/Graphics3D.en.md"
  - 
    title: "Locator"
    link: "https://reference.wolfram.com/language/ref/Locator.en.md"
  - 
    title: "Text"
    link: "https://reference.wolfram.com/language/ref/Text.en.md"
  - 
    title: "Rectangle"
    link: "https://reference.wolfram.com/language/ref/Rectangle.en.md"
  - 
    title: "Pane"
    link: "https://reference.wolfram.com/language/ref/Pane.en.md"
  - 
    title: "Panel"
    link: "https://reference.wolfram.com/language/ref/Panel.en.md"
  - 
    title: "PlotMarkers"
    link: "https://reference.wolfram.com/language/ref/PlotMarkers.en.md"
  - 
    title: "ImageSizeAction"
    link: "https://reference.wolfram.com/language/ref/ImageSizeAction.en.md"
  - 
    title: "Scale"
    link: "https://reference.wolfram.com/language/ref/Scale.en.md"
  - 
    title: "Rotate"
    link: "https://reference.wolfram.com/language/ref/Rotate.en.md"
  - 
    title: "Magnify"
    link: "https://reference.wolfram.com/language/ref/Magnify.en.md"
  - 
    title: "AttachCell"
    link: "https://reference.wolfram.com/language/ref/AttachCell.en.md"
related_tutorials: 
  - 
    title: "Insetting Objects in Graphics"
    link: "https://reference.wolfram.com/language/tutorial/TheStructureOfGraphicsAndSound.en.md#6502"
---
# Inset

Inset[obj] represents an object obj inset in a graphic. 

Inset[obj, pos] specifies that the inset should be placed at position pos in the graphic. 

Inset[obj, pos, opos] aligns the inset so that position opos in the object lies at position pos in the enclosing graphic. 

Inset[obj, pos, opos, size] specifies the size of the inset in the coordinate system of the enclosing graphic. 

Inset[obj, pos, opos, size, dirs] specifies that the axes of the inset should be oriented in directions dirs.

## Details and Options

* ``Inset`` can be used in ``Graphics`` and ``Graphics3D``.

* In interactive manipulation, ``Inset[obj, …]`` is by default selected as a single unit. A double‐click is required to select individual elements inside.

* The object ``obj`` can be a graphic, cell expression, string, or any other expression.

* An object inset in ``Graphics3D`` is displayed as a billboard while the 3D graphic is rotated.

* Positions can be specified by:

|                        |                                                      |
| :--------------------- | :--------------------------------------------------- |
| {x, y}                 | ordinary coordinates in a plot                       |
| Scaled[{x, y}, …]      | scaled coordinates from 0 to 1                       |
| ImageScaled[{x, y}, …] | scaled coordinates from 0 to 1 across a whole image  |
| Offset[{dx, dy}, …]    | absolute offset in printer's points                  |
| Center, etc.           | {Center, Center}, etc.                               |
| {valx, valy, valz}     | coordinates in a 3D graphic                          |

* $x$ coordinates can be numbers, ``Automatic``, or ``Left``, ``Center``, ``Right``, or ``Axis``.

* $y$ coordinates can be numbers, ``Automatic``, or ``Top``, ``Center``, ``Bottom``, ``Baseline``, or ``Axis``.

* ``Axis`` corresponds to the position of the axis in a plot or the center line in typeset text.

* ``Center`` corresponds to a position centered with respect to the whole image.

* ``Inset[obj]`` is equivalent to ``Inset[obj, Center]``.

* The default for ``opos`` is the setting for the ``AlignmentPoint`` option of ``obj``, or by default, the center of the bounding box for ``obj``.

* If ``size`` is ``Automatic``, the inset is given at its natural size:

|                    |                                  |
| :----------------- | :------------------------------- |
| graphic            | determined by ImageSize setting  |
| typeset expression | absolute size without wrapping   |

* A ``size`` of ``{w, Automatic}`` specifies that a typeset expression should be wrapped at width ``w``.

* If ``size`` is given as ``{w, h}``, then any object ``obj`` whose aspect ratio is not fixed will be horizontally or vertically stretched so as to fit exactly in a ``w``×``h`` rectangle.

* If ``obj`` is an object with fixed aspect ratio, then blank space will be left equally on both sides if there is a direction where the object would have to be stretched in order to fit exactly.

* The setting for the option ``Background`` specifies the background to be used for the whole region of the inset.

* By default, the inset is arranged so that its $x$ and $y$ directions are oriented with the $x$ and $y$ directions of the enclosing graphic.

* ``Inset[…, dirs]`` can be used to specify different orientations.

* Possible choices for ``dirs`` are:

|     |     |
| :-------------------- | :------------------------------------------------------------------------------------------------------------- |
| Automatic | default orientation  |
| {xx, xy} | $x$ direction along {xx, xy} |
| {Automatic, {yx, yy}} | $y$ direction along {yx, yy} |
| {{xx, xy}, {yx, yy}} | $x$ and $y$ directions along {xx, xy} and {yx, yy} |
| None | never reorient the contents of the Inset |

* Specifying only the $x$ or only the $y$ direction in general leads to a rigid rotation of the inset.

* Specifying both the $x$ and $y$ directions in general leads to a rotation and shear, in which the original inset rectangle becomes a parallelogram defined by the vector directions given.

* Only the directions of the vectors ``{xx, xy}`` and ``{yx, yy}`` are significant; the scale of the inset is determined by ``{w, h}``.

* With ``dirs`` specified as ``None``, the $x$ direction of ``obj`` is always maintained as horizontal.

* With ``dirs`` specified as ``{Automatic, None}``, the $y$ direction is maintained as vertical.

* If ``Inset[Graphics3D[…], {x, y}]`` appears in a 2D graphic, then the projection of the alignment point of the ``Graphics3D``, or by default the center of its 2D bounding box, will be placed at position ``{x, y}`` in the 2D graphic.

* ``Inset[Graphics3D[…], {x, y, z}, {ox, oy}]`` specifies that position ``{ox, oy}`` in the 2D projection of the object should lie at position ``{x, y, z}``.

* The 2D graphic is always taken to be oriented parallel to the viewing plane for the 3D graphic.

* The following options can be given for ``Inset``:

|                    |           |                                                          |
| :----------------- | :-------- | :------------------------------------------------------- |
| Alignment          | Left      | how to align the contents of the inset                   |
| Background         | None      | the background to use for the whole region of the inset  |
| BaseStyle          | {}        | the base style to use for the inset                      |
| ContentSelectable  | Automatic | whether to allow contents to be selected                 |
| FormatType         | Automatic | format type for text                                     |

* ``Background -> Automatic`` uses whatever background has been specified for the whole graphic containing the inset.

* ``Scaled``, ``ImageScaled``, and ``Offset`` forms can be used to specify the size.

## Examples (39)

### Basic Examples (4)

Inset a plot into a disk:

```wl
In[1]:= Graphics[{LightGray, Disk[], Inset[Plot[Tan[x], {x, -3, 3}]]}]

Out[1]= [image]
```

---

Inset an expression in a graphic:

```wl
In[1]:= Graphics[{Circle[], Inset[x ^ 2 + y ^ 2 == 1, {0, 0}]}]

Out[1]= [image]
```

---

Inset 3D graphics above a 2D plot:

```wl
In[1]:= Plot[Sin[x], {x, 0, 10}, Epilog -> Inset[Graphics3D[Cylinder[], ImageSize -> 60, Boxed -> False], {0.5, Center}]]

Out[1]= [image]
```

---

Inset a 2D graphic into a 3D graphic:

```wl
In[1]:= Graphics3D[{Sphere[{0, -1, 0}, 0.5], Cuboid[{-0.25, 0.5, -0.25}, {0.25, 1, 0.25}], Inset[Graphics[{Disk[{0, 0}, .25]}, ImageSize -> 50], {0, 0, 0}]}, PlotRange -> 2]

Out[1]= [image]
```

### Scope (19)

#### Positions (6)

By default, ``Center`` is used for the position:

```wl
In[1]:=
{Graphics[{Inset["ABCDEF"], Circle[]}, Axes -> True, Ticks -> None], 
	Graphics[{Inset["ABCDEF", Center], Circle[]}, Axes -> True, Ticks -> None]}

Out[1]= {[image], [image]}
```

``Automatic`` is equivalent to ``Center`` :

```wl
In[2]:= Graphics[{Inset["ABCDEF", Automatic], Circle[]}, Axes -> True, Ticks -> None]

Out[2]= [image]
```

---

Specify ordinary coordinates in a graphic:

```wl
In[1]:= Graphics[{Inset[x ^ 2 + y ^ 2 == 1, {0, .5}], Circle[]}, Frame -> True]

Out[1]= [image]

In[2]:= Graphics3D[{Opacity[.5], Inset["ABCDEF", {0, 0, 0}], Sphere[]}, Axes -> True]

Out[2]= [image]
```

---

Use ``Scaled`` coordinates:

```wl
In[1]:= Graphics[{Inset[x ^ 2 + y ^ 2 == 1, Scaled[{.5, .25}]], Circle[]}, Frame -> True]

Out[1]= [image]

In[2]:= Graphics3D[{Opacity[.5], Inset["ABCDEF", Scaled[{.5, .5, 0.25}]], Sphere[]}, Axes -> True]

Out[2]= [image]
```

---

``ImageScaled`` specifies coordinates in a whole image including padding:

```wl
In[1]:= Framed@Graphics[{Inset[x ^ 2 + y ^ 2 == 1, ImageScaled[{.5, .5}]], Circle[]}, ImagePadding -> {{0, 50}, {0, 0}}]

Out[1]= [image]
```

---

Use ``Offset`` coordinates:

```wl
In[1]:= Graphics[{Inset[x ^ 2 + y ^ 2 == 1, Offset[{10, 20}, {0, 0}]], Circle[]}]

Out[1]= [image]
```

---

Symbolic positions can be specified:

```wl
In[1]:= Table[Graphics[{Inset["ABCDEF", {s, Center}], Circle[]}], {s, {Left, Center, Right}}]

Out[1]= {[image], [image], [image]}

In[2]:= Table[Graphics[{Inset["ABCDEF", {Center, s}], Circle[]}], {s, {Top, Center, Bottom}}]

Out[2]= {[image], [image], [image]}
```

#### Alignments (4)

By default, ``Center`` is used for the alignment position:

```wl
In[1]:=
{Graphics[{Inset["ABCDEF", {0, 0}], Circle[]}, Axes -> True, Ticks -> None], 
	Graphics[{Inset["ABCDEF", {0, 0}, Center], Circle[]}, Axes -> True, Ticks -> None]}

Out[1]= {[image], [image]}
```

``Automatic`` is equivalent to ``Center`` :

```wl
In[2]:= Graphics[{Inset["ABCDEF", {0, 0}, Automatic], Circle[]}, Axes -> True, Ticks -> None]

Out[2]= [image]

In[3]:= {Graphics3D[{Opacity[.5], Inset["ABCDEF", {0, 0, 0}], Sphere[]}, Axes -> True], Graphics3D[{Opacity[.5], Inset["ABCDEF", {0, 0, 0}, Automatic], Sphere[]}, Axes -> True], Graphics3D[{Opacity[.5], Inset["ABCDEF", {0, 0, 0}, Center], Sphere[]}, Axes -> True]}

Out[3]= {[image], [image], [image]}
```

---

Specify an alignment position within the inset, using symbolic positions:

```wl
In[1]:= Table[Graphics[{Inset["ABCDEF", {0, 0}, {p, Center}], Circle[]}, Axes -> {False, True}, Ticks -> None], {p, {Right, Center, Left}}]

Out[1]= {[image], [image], [image]}

In[2]:= Table[Graphics[{Inset["ABCDEF", {0, 0}, {Center, p}], Circle[]}, Axes -> {True, False}, Ticks -> None], {p, {Top, Center, Bottom}}]

Out[2]= {[image], [image], [image]}

In[3]:= Table[Graphics3D[{Inset["ABCDEF", {0, 0, 0}, {p, Center}], Line[{{{0, -1, 0}, {0, 1, 0}}, {{-1, 0, 0}, {1, 0, 0}}, {{0, 0, -1}, {0, 0, 1}}}]}, Axes -> True], {p, {Right, Center, Left}}]

Out[3]= {[image], [image], [image]}

In[4]:= Table[Graphics3D[{Inset["ABCDEF", {0, 0, 0}, {Center, p}], Line[{{{0, -1, 0}, {0, 1, 0}}, {{-1, 0, 0}, {1, 0, 0}}, {{0, 0, -1}, {0, 0, 1}}}]}, Axes -> True], {p, {Top, Center, Bottom}}]

Out[4]= {[image], [image], [image]}
```

---

Specify an alignment position using the inset graphics coordinates:

```wl
In[1]:= g = Plot[Sin[x], {x, 0, 2Pi}, Ticks -> {{0, Pi, 2Pi}, {-1, 1}}, ImageSize -> 60];

In[2]:= Table[Graphics[{Inset[g, Center, {p, 0}], Circle[]}, Axes -> {False, True}, Ticks -> None], {p, {0, Pi, 2Pi}}]

Out[2]= {[image], [image], [image]}

In[3]:= Table[Graphics[{Inset[g, Center, {Pi, p}], Circle[]}, Axes -> {True, False}, Ticks -> None], {p, {-1, 0, 1}}]

Out[3]= {[image], [image], [image]}

In[4]:= Table[Graphics3D[{Inset[g, {0, 0, 0}, {p, Center}], Line[{{{0, -1, 0}, {0, 1, 0}}, {{-1, 0, 0}, {1, 0, 0}}, {{0, 0, -1}, {0, 0, 1}}}]}, Axes -> True], {p, {0, Pi, 2Pi}}]

Out[4]= {[image], [image], [image]}

In[5]:= Table[Graphics3D[{Inset[g, {0, 0, 0}, {Pi, p}], Line[{{{0, -1, 0}, {0, 1, 0}}, {{-1, 0, 0}, {1, 0, 0}}, {{0, 0, -1}, {0, 0, 1}}}]}, Axes -> True], {p, {-1, 0, 1}}]

Out[5]= {[image], [image], [image]}
```

---

Set the $x$ axis as an alignment position:

```wl
In[1]:= g = Plot[Sin[x], {x, 0, 2Pi}, Ticks -> None, AxesOrigin -> {0, 1 / 2}, ImageSize -> 60];

In[2]:= Graphics[{Inset[g, Center, {Center, Axis}], Circle[]}, Axes -> True, AxesStyle -> Dashed, Ticks -> None]

Out[2]= [image]
```

#### Sizes (6)

If the size is not given, or is ``Automatic``, the image size of the inset graphic is used:

```wl
In[1]:= g = Plot[Sin[x], {x, 0, 10}, Frame -> True, FrameTicks -> None, ImageSize -> 50];

In[2]:= {Graphics[{Inset[g], Circle[]}, Axes -> True, Ticks -> None], Graphics[{Inset[g, Center, Center, Automatic], Circle[]}, Axes -> True, Ticks -> None]}

Out[2]= {[image], [image]}

In[3]:= {Graphics3D[{Inset[g, {0, 0, 0}, Automatic], Line[{{{0, -1, 0}, {0, 1, 0}}, {{-1, 0, 0}, {1, 0, 0}}, {{0, 0, -1}, {0, 0, 1}}}]}, Axes -> True], Graphics3D[{Inset[g, {0, 0, 0}, Automatic, Automatic], Line[{{{0, -1, 0}, {0, 1, 0}}, {{-1, 0, 0}, {1, 0, 0}}, {{0, 0, -1}, {0, 0, 1}}}]}, Axes -> True]}

Out[3]= {[image], [image]}
```

---

For typeset expressions, absolute font size is used:

```wl
In[1]:= {Graphics[{Inset[Style["ABCDEF", 10]], Circle[]}], Graphics[{Inset[Style["ABCDEF", 20]], Circle[]}]}

Out[1]= {[image], [image]}
```

---

Specify the width of the inset by the units of the enclosing graphic:

```wl
In[1]:= g = Plot[Sin[x], {x, 0, 10}, Frame -> True, FrameTicks -> None];

In[2]:= Table[Graphics[{Inset[g, Automatic, Automatic, s], Circle[{0, 0}, 2]}, Frame -> True], {s, {1, 2, 3}}]

Out[2]= {[image], [image], [image]}
```

---

Given both width and height sizes, the inset graphic will be stretched, if the aspect ratio is not fixed:

```wl
In[1]:= g = Plot[Sin[x], {x, 0, 10}, Frame -> True, FrameTicks -> None, AspectRatio -> Full];

In[2]:= Table[Graphics[{Inset[g, Automatic, Automatic, {s, s}], Circle[{0, 0}, 2]}, Frame -> True], {s, {1, 2, 3}}]

Out[2]= {[image], [image], [image]}
```

---

``{w, Automatic}`` specifies the width at which a typeset expression should be wrapped:

```wl
In[1]:= t = "abcd xyz abcd xyz abcd xyz abcd xyz abcd xyz";

In[2]:= Table[Graphics[{Inset[Framed[t], Automatic, Automatic, {s, Automatic}], Circle[{0, 0}, 2]}, Frame -> True], {s, {2, 4}}]

Out[2]= {[image], [image]}
```

---

In 3D graphics, image size is specified in absolute values:

```wl
In[1]:= g = Plot[Sin[x], {x, 0, 10}, Frame -> True, FrameTicks -> None];

In[2]:= Table[Graphics3D[{Inset[g, {0, 0, 0}, Automatic, s], Line[{{{0, -1, 0}, {0, 1, 0}}, {{-1, 0, 0}, {1, 0, 0}}, {{0, 0, -1}, {0, 0, 1}}}]}, Axes -> True], {s, {30, 60, 90}}]

Out[2]= {[image], [image], [image]}

In[3]:= Table[Graphics3D[{Inset[g, {0, 0, 0}, Automatic, {s, s}], Line[{{{0, -1, 0}, {0, 1, 0}}, {{-1, 0, 0}, {1, 0, 0}}, {{0, 0, -1}, {0, 0, 1}}}]}, Axes -> True], {s, {30, 60, 90}}]

Out[3]= {[image], [image], [image]}
```

``Scaled`` can also be used to specify the image size:

```wl
In[4]:= Graphics3D[{Inset[g, {0, 0, 0}, Automatic, Scaled[{.3, .2}]], Line[{{{0, -1, 0}, {0, 1, 0}}, {{-1, 0, 0}, {1, 0, 0}}, {{0, 0, -1}, {0, 0, 1}}}]}, Axes -> True]

Out[4]= [image]
```

#### Directions (3)

Specify the direction with which the $x$ axis of the inset should be aligned:

```wl
In[1]:= g = Plot[Sin[x ^ 2], {x, 0, 4}, Axes -> True, Ticks -> None];

In[2]:= Table[Graphics[{Inset[g, Automatic, Automatic, 1.5, d], Circle[]}], {d, {{1, 0}, {1, 1}, {0, 1}}}]

Out[2]= {[image], [image], [image]}

In[3]:= Table[Graphics3D[{Inset[g, {0, 0, 0}, Automatic, 100, d]}], {d, {{1, 0}, {1, 1}, {0, 1}}}]

Out[3]= [image]

In[4]:= Table[Graphics[{Inset["ABCDEF", Automatic, Automatic, Automatic, d], Circle[]}], {d, {{1, 0}, {1, 1}, {0, 1}}}]

Out[4]= {[image], [image], [image]}

In[5]:= Table[Graphics3D[{Inset["ABCDEF", {0, 0, 0}, Automatic, Automatic, d]}], {d, {{1, 0}, {1, 1}, {0, 1}}}]

Out[5]= {[image], [image], [image]}
```

---

Specify the direction with which the $y$ axis of the inset should be aligned:

```wl
In[1]:= g = Plot[Sin[x ^ 2], {x, 0, 4}, Axes -> True, Ticks -> None];

In[2]:= Table[Graphics[{Inset[g, Automatic, Automatic, 1.5, {Automatic, d}], Circle[]}], {d, {{1, 0}, {1, 1}, {0, 1}}}]

Out[2]= {[image], [image], [image]}

In[3]:= Table[Graphics3D[{Inset[g, {0, 0, 0}, Automatic, 100, {Automatic, d}]}], {d, {{1, 0}, {1, 1}, {0, 1}}}]

Out[3]= [image]

In[4]:= Table[Graphics[{Inset["ABCDEF", Automatic, Automatic, Automatic, {Automatic, d}], Circle[]}], {d, {{1, 0}, {1, 1}, {0, 1}}}]

Out[4]= {[image], [image], [image]}

In[5]:= Table[Graphics3D[{Inset["ABCDEF", {0, 0, 0}, Automatic, Automatic, {Automatic, d}]}], {d, {{1, 0}, {1, 1}, {0, 1}}}]

Out[5]= {[image], [image], [image]}
```

---

Specify the directions for the $x$ and $y$ axes separately:

```wl
In[1]:= g = Plot[Sin[x ^ 2], {x, 0, 4}, Axes -> True, Ticks -> None];

In[2]:= {Graphics[{Inset[g, Automatic, Automatic, 1.5, {{2, 0}, {1, 2}}], Circle[]}], Graphics3D[{Inset[g, {0, 0, 0}, Automatic, 100, {{2, 0}, {1, 2}}]}]}

Out[2]= {[image], [image]}

In[3]:= {Graphics[{Inset[Style["ABCDEF", 20], Automatic, Automatic, Automatic, {{2, 0}, {1, 2}}], Circle[]}], Graphics3D[{Inset[Style["ABCDEF", 20], {0, 0, 0}, Automatic, Automatic, {{2, 0}, {1, 2}}]}]}

Out[3]= {[image], [image]}
```

### Generalizations & Extensions (3)

Flip in the $x$ direction:

```wl
In[1]:= {Graphics[{Inset[Style["ABCDEF", 20], Automatic, Automatic, Automatic, {{-1, 0}, {0, 1}}], Circle[]}], Graphics3D[{Inset[Style["ABCDEF", 20], {0, 0, 0}, Automatic, Automatic, {{-1, 0}, {0, 1}}]}]}

Out[1]= {[image], [image]}
```

---

Flip in the $y$ direction:

```wl
In[1]:= {Graphics[{Inset[Style["ABCDEF", 20], Automatic, Automatic, Automatic, {{1, 0}, {0, -1}}], Circle[]}], Graphics3D[{Inset[Style["ABCDEF", 20], {0, 0, 0}, Automatic, Automatic, {{1, 0}, {0, -1}}]}]}

Out[1]= {[image], [image]}
```

---

Inset a control:

```wl
In[1]:=
control = DynamicModule[{x = 0}, Button[Dynamic[x], x++;EmitSound[Sound[SoundNote[]]]]];
	
{Graphics[{Circle[], Inset[control, {0, 0}]}], Graphics3D[{Sphere[{0, -1, 0}, 0.5], Inset[control, {0, 0, 0}]}]}

Out[1]= {[image], [image]}
```

### Options (7)

#### Alignment (1)

Determine how to align the contents of the inset:

```wl
In[1]:= t = "abcd xyz abcd xyz abcd xyz abcd xyz";

In[2]:= Table[Graphics[{Inset[Framed[t], Automatic, Automatic, {1.5, Automatic}, Alignment -> a], Circle[]}], {a, {Left, Center, Right}}]

Out[2]= {[image], [image], [image]}
```

#### Background (1)

Specify the background color:

```wl
In[1]:= {Graphics[{Inset[x ^ 2 + y ^ 2 < 1, Background -> LightRed], Circle[]}], Graphics3D[{Inset[x ^ 2 + y ^ 2 < 1, Background -> LightRed]}]}

Out[1]= {[image], [image]}
```

#### BaseStyle (2)

Set the base style:

```wl
In[1]:= {Graphics[{Inset[Style["circle", Blue], BaseStyle -> Directive[Large, Italic]], Circle[]}], Graphics3D[{Inset[Style["circle", Blue], BaseStyle -> Directive[Large, Italic]]}]}

Out[1]= {[image], [image]}
```

---

Use a named style:

```wl
In[1]:= {Graphics[{Inset["circle", BaseStyle -> "Title"], Circle[]}], Graphics3D[{Inset["circle", BaseStyle -> "Title"]}]}

Out[1]= {[image], [image]}
```

#### ContentSelectable (1)

Determine whether to allow the contents to be selected:

```wl
In[1]:= g = Plot[Sin[x], {x, 0, 10}];

In[2]:= {Graphics[{Inset[g, ContentSelectable -> True], Circle[]}], Graphics[{Inset[g, ContentSelectable -> False], Circle[]}]}

Out[2]= {[image], [image]}
```

#### FormatType (2)

By default, expressions are displayed using ``TraditionalForm`` :

```wl
In[1]:= Graphics[{Inset[Style[x ^ 2 + y ^ 2 < 1, Medium]], Circle[]}]

Out[1]= [image]
```

---

Display expressions using ``StandardForm`` :

```wl
In[1]:= Graphics[{Inset[Style[x ^ 2 + y ^ 2 < 1, Medium], FormatType -> StandardForm], Circle[]}]

Out[1]= [image]
```

### Applications (3)

Multiple function plot with a legend:

```wl
In[1]:= legendPlot[xl_List, d_, args___] := Plot[xl, d, Epilog -> Inset[Panel[Grid[MapIndexed[{Graphics[{ColorData[97, First@#2], Thick, Line[{{0, 0}, {1, 0}}]}, AspectRatio -> .1, ImageSize -> 20], #1}&, xl]]], Offset[{-2, -2}, Scaled[{1, 1}]], {Right, Top}], args]

In[2]:= legendPlot[{Sin[x], Cos[x], Sinc[x]}, {x, 0, 10}]

Out[2]= [image]
```

---

Select countries:

```wl
In[1]:= co = {"Austria", "Belgium", "France", "Germany", "Ireland", "Italy", "Luxembourg", "Netherlands", "Portugal", "Spain", "Switzerland", "UnitedKingdom"};
```

Set up an annotation function using ``Inset`` :

```wl
In[2]:= a[c_] := Inset[Grid[{{c, SpanFromLeft}, {"Pop.", Row[{Round[CountryData[c, "Population"] / 10 ^ 6], " mil."}]}, {"Flag", Show[CountryData[c, "Flag"], ImageSize -> 30]}}, BaseStyle -> Directive[Small, FontFamily -> "Helvetica"], Background -> White, Frame -> All], Reverse@CountryData[c, "CenterCoordinates"]];
```

Display the map with the annotations:

```wl
In[3]:= Graphics[{EdgeForm[Black], LightBlue, CountryData[#, "Polygon"]& /@ co, Black, a /@ co}, ImageSize -> 500]

Out[3]= [image]
```

---

Define a stock plot with a legend:

```wl
In[1]:= stockPlot[sl_List, {y_, m_}, args___] := DateListPlot[FinancialData[#, {y, m}]& /@ sl, Joined -> True, PlotMarkers -> Automatic, PlotRange -> {All, {0, All}}, PlotStyle -> ColorData[91, "ColorList"], Epilog -> Inset[Panel[Grid[MapIndexed[{Style[{●, ■, ◆}[[First@#2]], ColorData[91, First@#2]], FinancialData[#1, "Name"]}&, sl]]], Offset[{-2, 2}, Scaled[{1, .3}]], {Right, Bottom}], args]
```

Draw stock price changes of a few automakers:

```wl
In[2]:= stockPlot[{"F", "TM", "HMC"}, {2007, 3}]

Out[2]= [image]
```

### Properties & Relations (2)

The symbolic positions are relative to ``ImageScaled`` coordinates:

```wl
In[1]:= Table[Framed@Graphics[{Inset["ABCDEF", {s, Center}], Circle[]}, ImagePadding -> {{10, 40}, {0, 0}}], {s, {Left, Center, Right}}]

Out[1]= {[image], [image], [image]}

In[2]:= Table[Framed@Graphics[{Inset["ABCDEF", {Center, s}], Circle[]}, ImagePadding -> {{0, 0}, {10, 20}}], {s, {Top, Center, Bottom}}]

Out[2]= {[image], [image], [image]}
```

---

For typeset expressions, ``Text`` offers functionality similar to ``Inset`` :

```wl
In[1]:= Graphics[{Text[x ^ 2 + y ^ 2 == 1, {0, 0}], Circle[]}]

Out[1]= [image]

In[2]:= Graphics3D[{Text[x ^ 2 + y ^ 2 + z ^ 2 == 1, {0, 0, 0}], Sphere[]}]

Out[2]= [image]
```

### Neat Examples (1)

Random collage of text:

```wl
In[1]:= Graphics[Table[Inset[Style["Mathematica", Hue[RandomReal[]], Italic, RandomInteger[{10, 30}]], RandomReal[1, {2}], Automatic, Automatic, RandomReal[{-1, 1}, {2}]], {20}], AspectRatio -> 1 / GoldenRatio, ImageSize -> 300]

Out[1]= [image]
```

## See Also

* [`GraphicsGroup`](https://reference.wolfram.com/language/ref/GraphicsGroup.en.md)
* [`Item`](https://reference.wolfram.com/language/ref/Item.en.md)
* [`Graphics`](https://reference.wolfram.com/language/ref/Graphics.en.md)
* [`Graphics3D`](https://reference.wolfram.com/language/ref/Graphics3D.en.md)
* [`Locator`](https://reference.wolfram.com/language/ref/Locator.en.md)
* [`Text`](https://reference.wolfram.com/language/ref/Text.en.md)
* [`Rectangle`](https://reference.wolfram.com/language/ref/Rectangle.en.md)
* [`Pane`](https://reference.wolfram.com/language/ref/Pane.en.md)
* [`Panel`](https://reference.wolfram.com/language/ref/Panel.en.md)
* [`PlotMarkers`](https://reference.wolfram.com/language/ref/PlotMarkers.en.md)
* [`ImageSizeAction`](https://reference.wolfram.com/language/ref/ImageSizeAction.en.md)
* [`Scale`](https://reference.wolfram.com/language/ref/Scale.en.md)
* [`Rotate`](https://reference.wolfram.com/language/ref/Rotate.en.md)
* [`Magnify`](https://reference.wolfram.com/language/ref/Magnify.en.md)
* [`AttachCell`](https://reference.wolfram.com/language/ref/AttachCell.en.md)

## Tech Notes

* [Insetting Objects in Graphics](https://reference.wolfram.com/language/tutorial/TheStructureOfGraphicsAndSound.en.md#6502)

## Related Guides

* [Combining Graphics](https://reference.wolfram.com/language/guide/CombiningGraphics.en.md)
* [Annotating & Combining Graphics](https://reference.wolfram.com/language/guide/AnnotatingAndCombiningGraphics.en.md)
* [Dynamic Graphics Elements](https://reference.wolfram.com/language/guide/DynamicGraphicsElements.en.md)
* [Graphics Objects](https://reference.wolfram.com/language/guide/GraphicsObjects.en.md)
* [Symbolic Graphics Language](https://reference.wolfram.com/language/guide/SymbolicGraphicsLanguage.en.md)
* [Graphics Options & Styling](https://reference.wolfram.com/language/guide/GraphicsOptionsAndStyling.en.md)

## Related Workflows

* [Inset One Graphic into Another](https://reference.wolfram.com/language/workflow/InsetOneGraphicIntoAnother.en.md)

## Related Links

* [An Elementary Introduction to the Wolfram Language: Coordinates and Graphics](https://www.wolfram.com/language/elementary-introduction/14-coordinates-and-graphics.html)

## History

* [Introduced in 2007 (6.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn60.en.md) \| [Updated in 2008 (7.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn70.en.md) ▪ [2014 (10.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn100.en.md)