Callout

Callout[data,expr]

displays expr in a plot as a callout pointing to data.

Callout[data,expr,pos]

displays a callout with expr at a position specified by pos.

Callout[data,expr,pos,apos]

displays a callout anchored at a position specified by apos.

Details and Options

  • Callout[data,expr,] can be used as a wrapper in visualization functions such as Plot, ListPlot, etc.
  • Callout[expr,] can be used in PlotLabels to specify callouts, similar to Placed.
  • expr can be any expression, including strings, graphics, and formulas.
  • The callout position pos and anchor positions apos are automatically computed when specific positions are not given.
  • Possible callout positions pos vary by function, but typically include:
  • xnear the data at a position x
    {x,y}at a position {x,y}
    Scaled[s]scaled position s along the data
    Above,Below,Before,Afterrelative positions
    {s,Above},{s,Below},relative position at position s along the data
    {pos,epos}epos in expr placed at position pos
    Automaticpos is automatically determined
  • Possible anchor positions apos include:
  • xnear the data at a position x
    {x,y}at a position {x,y}
    Scaled[s]scaled position s along the data
    Automaticapos is automatically determined
  • Callout takes the following options:
  • AppearanceAutomaticoverall style of the callout
    BackgroundAutomaticstyle of the label background
    CalloutMarkerNonemarker to use for the anchor position apos
    CalloutStyleAutomaticstyle to use for strokes and knockouts
    FrameAutomaticframe of the label box
    FrameMarginsAutomaticmargins to leave inside the frame
    LabelStyle{}style to use for the label
    LeaderSizeAutomaticlength and angle to use for the leader
    RoundingRadius0radius for rounded corners
  • Possible values for Appearance:
  • "Leader"a leader is used from label to data
    "CurvedLeader"a curved leader
    "SlantedLabel"an angled label and neck
    "Frame"full frame around expr
    "Line"a partial frame around expr
    "Corners"frame corners around expr
    "Balloon"a balloon around expr
    "LineBalloon"a partial balloon around expr
    Noneno leader is drawn
  • Possible settings for CalloutMarker are:
  • Noneno marker is used
    "name"use named marker
    Arrowheads[]arrowhead specification
    gexpression g
  • The named markers "name" are:
  • "CirclePoint","Circle"circular markers
    "BoxPoint", "Box"square markers
    "Star", "OpenStar"star markers
    "Arrow", "OpenArrow"arrow markers
  • CalloutStyle specifies the style to be used for the marker, leader, neck, and frame. The marker, leader, and neck typically have the space around them padded with the ambient background color to increase visibility.
  • Possible values for CalloutStyle are:
  • Automaticdefault style is used
    styuse style sty, with the default knockout style
    {sty,kosty}use kosty for the knockout style
  • Possible values for LeaderSize:
  • Automaticautomatic leader size
    lrlength of the leader
    {lr,lθ,s}leader length lr at angle lθ and the gap s to the anchor
    {{lr,lθ,s},{nr,nθ}}leader specification with neck length nr at angle nθ

Examples

open allclose all

Basic Examples  (4)

Label points with callouts:

In[1]:=
Click for copyable input
Out[1]=

Use a named position for the callout:

In[2]:=
Click for copyable input
Out[2]=

Label a curve with a callout:

In[1]:=
Click for copyable input
Out[1]=

Use a named position relative to the curve for the callout:

In[1]:=
Click for copyable input
Out[1]=

Stylize the callout:

In[1]:=
Click for copyable input
Out[1]=

Scope  (15)

Options  (14)

Applications  (1)

See Also

Labeled  PlotLabels  ChartLabels  Placed  Plot  ListPlot  ListLinePlot  DateListPlot

Introduced in 2016
(11.0)