Re: How to plot strings s_i at point {x_i,y_i} ?
- To: mathgroup at smc.vnet.net
- Subject: [mg95035] Re: [mg95020] How to plot strings s_i at point {x_i,y_i} ?
- From: Jamie Coventry <jcoventry at renaissance.edu.hk>
- Date: Sun, 4 Jan 2009 07:31:19 -0500 (EST)
- References: <200901031055.FAA02759@smc.vnet.net>
Hi John, Not the most elegant solution I'm sure, but it works: num = 30; pts = Table[{Random[], Random[], RandomInteger[100]}, {i, 1, num}]; ptset = Table[pts[[i, 1 ;; 2]], {i, 1, num}]; ptlabel = Table[pts[[i, 3]], {i, 1, num}]; pts; ListPlot[Table[Tooltip[ptset[[i]], ptlabel[[i]]], {i, 1, num}], PlotStyle -> {Thick, PointSize[Large]}, PlotRange -> {{0, 1.1}, {0, 1.1}} ] Regards, Jamie On 3 Jan 2009, at 6:55 PM, John wrote: > Hello! > > I have a set of triplets {{x1,y1,s1},{x2,y2,s2},...}. I would like to > make a plot where the third element of each triplet, a string, is > plotted at the coordinate given by the the first two elements of the > triplet. How can I acheive this? Of course I don't mind reorganizing > the format of the data. It seems to me that PlotMarkers is not willing > to help me, since I want different markes within the same data set. > > Regards, > John > >