is an option for visualization functions that specifies how many items are automatically labeled.


LabelingTarget
is an option for visualization functions that specifies how many items are automatically labeled.
Details



- LabelingTarget controls the automatic placement of callouts and labels.
- LabelingTarget affects how many labels are shown by controlling whether labels are allowed to overlap with plot elements and other labels and by how much.
- The following settings can be given:
-
Automatic use the default placements All use all the labels None omit all labels f place the best fraction f of labels "Dense" place labels more densely "Sparse" place labels more sparsely <|"param1"val1,…|> detailed control of label placement - Possible parameters that affect label placement include:
-
"AllowedLabelingPositions"{pos1,…} possible locations for labels "AllowedOverlaps"{elem1,…} plot elements that labels can overlap "AllowLabelClipping"clip whether the plot range can clip labels "LabelingFraction"lf fraction of elements to label "LabelOverlapFraction"of maximum allowed overlap between labels - The following positions posi for "AllowedLabelingPositions" are supported:
-
"Left","Right","Bottom","Top" individual positions on the sides of the plot element "TopLeft","TopRight","BottomLeft","BottomRight" corner positions around the plot element "Sides" any side of the plot element "Corners" any corner of the plot element All all possible positions - The following elements for "AllowedOverlaps" are supported:
-
None labels may not overlap any plot elements All labels may overlap any plot elements "Points" labels may overlap individual points "Lines" labels may overlap lines {elem1,…} set of elements that can be overlapped - With the default setting "AllowLabelClipping"False, labels that would go beyond the plot range are not shown.
- Setting "AllowLabelClipping"True will show partial labels at the edges of the plot.
- "LabelingFraction"lf with
specifies the proportion of possible labels that should be present in the final plot.
- "LabelOverlapFraction"of with
specifies the fraction of a label that is allowed to overlap with other labels.
Examples
Basic Examples (7)
Labels are automatically placed to maximize readability:
Use a denser layout for the labels:
Show the quarter of the labels that are easiest to read:
Only allow labels that are orthogonal to the points:
Only allow labels that are diagonal to the points:
Restrict labels to be above or to the right of the points:
History
Text
Wolfram Research (2025), LabelingTarget, Wolfram Language function, https://reference.wolfram.com/language/ref/LabelingTarget.html.
CMS
Wolfram Language. 2025. "LabelingTarget." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LabelingTarget.html.
APA
Wolfram Language. (2025). LabelingTarget. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LabelingTarget.html
BibTeX
@misc{reference.wolfram_2025_labelingtarget, author="Wolfram Research", title="{LabelingTarget}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/LabelingTarget.html}", note=[Accessed: 04-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_labelingtarget, organization={Wolfram Research}, title={LabelingTarget}, year={2025}, url={https://reference.wolfram.com/language/ref/LabelingTarget.html}, note=[Accessed: 04-August-2025]}