# Labeling points in plot made from a dataset

I am trying to use Mathematica to do some data analysis. I am trying to label points in a plot of a dataset. I know that Callout should work, but can't for the life of me figure out how to make it when I'm plotting b against a and then labeling the points with c.

Here is a subset of the dataset:

dataset =
Dataset[{
<|"a" -> 0.0, "b" -> -1.26, "c" -> 1|>,
<|"a" -> 0.3, "b" -> -1.25, "c" -> 2|>,
<|"a" -> 0.6, "b" -> -1.26, "c" -> 3|>,
<|"a" -> 0.9, "b" -> -1.19, "c" -> 4|>,
<|"a" -> 1.2, "b" -> -0.8, "c" -> 5|>,
<|"a" -> 1.5, "b" -> -0.98, "c" -> 6|>}]

ListLinePlot[Callout[dataset[All, {1, 2}], dataset[All, 3]]] This doesn't give me what I want as I want to label each point.

I realize I'm missing something fundamental in terms of associating each point. Any assistance is appreciated.

Thanks for the two solutions. I want to modify the plot by assigning the plot to "g" and then using Show:

Show[g, ScalingFunctions -> "Reverse", PlotTheme -> "Detailed"]


but do not see how to do it. I tried using Show without success.

• Does dataset[Map[Callout[{#a, #b}, #c] &] /* ListLinePlot] do what you want? – J. M.'s torpor Feb 12 at 14:43
• Yes. Thanks. Hard to get my head around some of Mathematica's cryptic code. – reo Feb 12 at 14:58
• Alright, I'll post an answer later... – J. M.'s torpor Feb 12 at 15:10
• @J.M.'sennui That could also be written as dataset[ListLinePlot, Callout[{#a, #b}, #c] &]. – WReach Feb 12 at 15:39
• @WReach, that's way less awkward; please write an answer so I can upvote it. :) – J. M.'s torpor Feb 12 at 15:42

As suggested by @J.M.~~___, here is one way to do it:

dataset[ListLinePlot, Callout[{#a, #b}, #c] &]


Additional options can be added to ListLinePlot like this:

dataset[
ListLinePlot[#, ScalingFunctions->"Reverse", PlotTheme->"Detailed"]&
, Callout[{#a, #b}, #c] &
] 