Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Markers in a ListPlot' topicStudent Support Forum > General > Archives > "Markers in a ListPlot"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
10/04/12 12:49pm

Using PlotMarkers it would be easy to label each point in list1 with "1" and each point in list2 with "2", but I think I understand you want to label the first point of both lists with "1"s, the second point of both lists with "2"s, etc.

Perhaps you can see how to adapt this:

In[1]:= list1={{1,1},{2,5},{3,4}};
table1=Table[Text[i,list1[[i]]], {i,1,Length[list1]}];
list2={{1,2},{2,3},{3,1}};
table2=Table[Text[i,list2[[i]]], {i,1,Length[list2]}];
Show[Plot[0, {x,0,4}], Graphics[{table1, table2}]]

From In[1]:= <graphic snipped>

What that does is manually turn each of your points into a Text item and then Show[Graphics[]] will display those. And then I stuck in an "empty plot" to automatically create the axes for me.

Try that to verify it works for you. Then try using your own data and see if you can make any needed adjustments to get what you want.

There might be a trick somewhere with PlotMarkers to do all this for you, but it might take longer to find and figure it out than it takes to do this.

URL: ,

Subject (listing for 'Markers in a ListPlot')
Author Date Posted
Markers in a ListPlot Daniele Bard... 10/04/12 02:37am
Re: Markers in a ListPlot Bill Simpson 10/04/12 12:49pm
Re: Markers in a ListPlot Bill Simpson 10/04/12 1:02pm
Re: Markers in a ListPlot Daniele Bard... 10/05/12 08:42am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic