4
$\begingroup$

Using MM13.1 on Windows

How can I use callout together with NominalScale? I would have thought this could work but it doesn't.

  ListPlot[{{0, "Heads"}, Callout[{1, "Tails"}, "Label"], {2, "Tails"}},
  ScalingFunctions -> NominalScale[{"Heads", "Tails"}]]

enter image description here

ListPlot[{{0, 2}, Callout[{1, 1}, "Label"], {2, 1}}]

enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ It looks like an unimplemented functionality (formally a bug). Worth reporting to the support. $\endgroup$ Jul 9, 2022 at 16:32

1 Answer 1

3
$\begingroup$

A workaround

$Version

(* "13.1.0 for Mac OS X x86 (64-bit) (June 16, 2022)" *)

Clear["Global`*"]

data = {{0, "Heads"}, Callout[{1, "Tails"}, "Label"], {2, "Tails"}};

ListPlot[
 data /. {"Heads" -> 2, "Tails" -> 1},
 Ticks -> {Automatic,
   {{1, "Tails"}, {2, "Heads"}}}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks for the workaround I was hoping to not needed to go there. Anyway I'll report the "bug" to Wolfram $\endgroup$
    – Lou
    Jul 9, 2022 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.