Do Callouts work in Graphics? If so, how would I have the values of centers appear below the ellipses in this example?
centers = {0, 28.7, 33.8, 48.0, 55.4, 71.9};
Graphics[
Join[
({Black, Circle[{#, 0}, {0.1, 0.4}]} & /@ centers),
{{Red, Inset["|", {75, 0}]}}
],
ImageSize -> {640, Automatic}
]
gdelfino
(Gustavo Delfino)
September 2, 2021, 1:48pm
2
I think they don’t work in Graphics directly, but this works:
ListPlot[Callout[{#, 0}, #] & /@ centers, Axes -> False,
AspectRatio -> 1/6]
Thanks, but I must use Graphics as there are other items in this visualization.
gdelfino
(Gustavo Delfino)
September 2, 2021, 5:52pm
4
Well, we can extract the graphic primitives from the ListPlot output, even though it feels a bit hackish:
Graphics[
Join[({Black, Circle[{#, 0}, {0.1, 0.4}]} & /@ centers),
{{Red, Inset["|", {75, 0}]}}],
ImageSize -> {640, Automatic},
Prolog ->
ListPlot[Callout[{#, 0}, #, Below] & /@ centers, PlotMarkers -> ""][[1]],
ImagePadding -> 10
]
That’s a creative solution!
Here I used Inset to create callouts. The application is sequence coverage of gene locations in shotgun whole genome scans. Notice some chromosomes contain gaps, resulting in non-contiguous chromosome assembly.