Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.7K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

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?

POSTED BY: Malcolm Woodruff
2 Replies
POSTED BY: Malcolm Woodruff

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.

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard