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:
  • Appearance Automaticoverall style of the callout
    Background Automaticstyle of the label background
    CalloutMarker Nonemarker to use for the anchor position apos
    CalloutStyle Automaticstyle to use for strokes and knockouts
    Frame Automaticframe of the label box
    FrameMargins Automaticmargins to leave inside the frame
    LabelStyle {}style to use for the label
    LabelVisibility Automaticpriority relative to other labels
    LeaderSize Automaticlength and angle to use for the leader
    RoundingRadius 0radius 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:

Use a named position for the callout:

Label a curve with a callout:

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

Stylize the callout:

Scope  (15)

Label Placement  (8)

Callouts are placed near individual points:

Callouts are automatically placed at the ends of curves:

Place callouts relative to the points:

Place labels near an absolute position on a curve:

Place labels near a scaled position on a curve:

Place labels above the curve near the given positions:

Place a label at a specific point:

Specify the position in the label that connects to the leader:

Anchor Placement  (3)

Specify where the leader should point to on the curve with an absolute position:

Specify where the leader should point to on the curve with a scaled position:

Specify an exact point the leader should point to:

Presentation  (4)

Place the callout in a frame:

Use a balloon:

Circle the anchor point for the callout on the curve:

Point to it with an arrow:

Use uniform leader lines for the callouts:

Style the callouts to match their curves:

Options  (17)

Appearance  (2)

Use different named appearances:

Combine appearance with other styling:

Background  (1)

Stylize the background of the callout label:

CalloutMarker  (2)

Use named markers:

Use Arrowheads as a marker:

CalloutStyle  (2)

Change the color of the leader:

Specify the knockout style:

Frame  (1)

Use frame:

Draw only the top and bottom frame edges:

FrameMargins  (1)

Control the margins around the callout label:

With the balloon appearance:

LabelVisibility  (3)

Callouts are pruned to avoid collisions:

Label all the even-numbered points in a plot, even if some of them collide:

Label even-numbered points while avoiding collisions:

LeaderSize  (3)

Specify the leader length:

Control the slope of the leader:

Specify the distance between the leader and the curve:

Specify both leader and neck length and angle:

LabelStyle  (1)

Style the callout label:

RoundingRadius  (1)

Use a rounded rectangle around the callout label:

With the balloon appearance:

Applications  (1)

Get the area and population for every country in the world:

Add callouts to some of the countries that have relatively extreme areas or populations:

Plot the data on a log-log scale:

Wolfram Research (2016), Callout, Wolfram Language function, https://reference.wolfram.com/language/ref/Callout.html (updated 2019).

Text

Wolfram Research (2016), Callout, Wolfram Language function, https://reference.wolfram.com/language/ref/Callout.html (updated 2019).

CMS

Wolfram Language. 2016. "Callout." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/Callout.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_callout, author="Wolfram Research", title="{Callout}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/Callout.html}", note=[Accessed: 05-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_callout, organization={Wolfram Research}, title={Callout}, year={2019}, url={https://reference.wolfram.com/language/ref/Callout.html}, note=[Accessed: 05-December-2024 ]}