Positioning text in a graph

Is there a way more convenient to position the text beside the circles. How can I do this in automatic mode?

data = {{0, 2}, {4, 5}, {8, 7}, {10, 25}}
Graphics[{PointSize[0.1],
Point[data],
Text[Style[“0,2”,
FontSize -> 20, Bold, Red], {0, 2}, {2, 0}],
Text[Style[“4,5”, FontSize -> 20, Bold, Red], {4, 5}, {2, 0}],
Text[Style[“8,7”, FontSize -> 20, Bold, Red], {8, 7}, {2, 0}],
Text[Style[“10,25”, FontSize -> 20, Bold, Red], {10, 25}, {2, 0}]}]

=================

=================

2 Answers
2

=================

pts = {{0, 2}, {4, 5}, {8, 7}, {10, 25}};
fmt = StringTemplate[““,“”];
texts = {Red,
Text[Style[fmt @@ #, Bold, FontSize -> 20], #, {2, 0}]} & /@ pts;
Graphics[{PointSize[0.1], Point[pts], texts}]

Try this:

data = {{0, 2}, {4, 5}, {8, 7}, {10, 25}}

Graphics[{PointSize[0.1],
Point[data],
Text[Style[{data[[1, 1]], data[[1, 2]]}, FontSize -> 20, Bold,
Red], {data[[1, 1]], data[[1, 2]]}, {2, 0}],
Text[Style[{data[[2, 1]], data[[2, 2]]}, FontSize -> 20, Bold,
Red], {data[[2, 1]], data[[2, 2]]}, {2, 0}],
Text[Style[{data[[3, 1]], data[[3, 2]]}, FontSize -> 20, Bold,
Red], {data[[3, 1]], data[[3, 2]]}, {2, 0}],
Text[Style[{data[[4, 1]], data[[4, 2]]}, FontSize -> 20, Bold,
Red], {data[[4, 1]], data[[4, 2]]}, {2, 0}]}]

  

 

I will try to do this…
– JPeter
Sep 24 at 19:42