Values as PlotMarkers

I have a list of numbers that I have extracted from a data set that I want to use as PlotMarkers eg. showing the number of a point and/or its x,y value at the position of a point. However, PlotMarker only seems to accept numbers in the form “1” Adding quote marks would be tedious for a long list so how do I get over this?

When you put quotes around something, it becomes a string. Strings are common objects in essentially every programming language.

Mathematica has a function called ToString to make things into strings. You can use Map to map ToString onto a list:

Map[ToString,{1,2,3,4,5}]

Note: Strings often appear in output with their quotes hidden, so if you want to see them, you’ll have to run InputForm on the output to see that the quotes are there.

Thank you Sean, I had forgotten about the Map function. However, I eventually found that my problem is that PlotMarkers only act on ranges (lists) of points, not individual points. So if you want to label each point differently you have to enclose it in curly brackets so it’s a list consisting of one item.