Skip to main content

Inset

WLJS
Execution environment
Supports dynamics
Inset[expr_]
Inset[expr_, pos_List, origin: Center]

a graphics object, that allows to put another Graphics, Image, EditorView, CellView or anything else on the canvas.

Parameters:

  • pos has to be a 2D vector, that specifies the position of the inset in the local coordination system
  • origin is optional and specifies the anchor:
      • "Center" (default value)
      • "Top"
      • "Bottom"
      • "Left"
      • "Right"

Examples

inset = Graphics[{
LightRed,
Disk[{0,0},0.25],
Black, Directive[FontSize->16], Text["Test", {0,0}, {0,0}]
}, PlotRange->{{-1,1}, {-1,1}}];

Plot[x, {x,0,10}, Epilog->{Inset[inset, {5,5}]}]

or use place any Wolfram expression:

Dynamics

The second arguments pos that specifies the position of an inset does support updates.