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

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

Ah, I did think of a trick that would almost certainly not be in the help pages for PlotMarker.

Instead of thinking of 3 lists of n points, what if somehow you could turn your data into n lists of 3 points? And you use a PlotMarker of 1 for the first of those lists, 2 for the second of those lists, etc?

You have three lists of four points.

In[1]:=
list1={{a1,a2},{a3,a4},{a5,a6},{a7,a8}};
list2={{b1,b2},{b3,b4},{b5,b6},{b7,b8}};
list3={{c1,c2},{c3,c4},{c5,c6},{c7,c8}};
Transpose[{list1,list2,list3}]

And now you have four lists of three points.

Out[1]=
{{{a1,a2},{b1,b2},{c1,c2}},
{{a3,a4},{b3,b4},{c3,c4}},
{{a5,a6},{b5,b6},{c5,c6}},
{{a7,a8},{b7,b8},{c7,c8}}}

Use Plot on that with 1,2,3,4 for PlotMarkers and the first point of each of your old lists should get a .

Much simpler than before.

There are almost always a dozen different ways of doing anything in Mathematica and sometimes one of those is much simpler, if you can just think of it.

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