Plot Joined Intelligently

• To: mathgroup at smc.vnet.net
• Subject: [mg30501] Plot Joined Intelligently
• From: Hugh Goyder <goyder at rmcs.cranfield.ac.uk>
• Date: Fri, 24 Aug 2001 04:05:59 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Dear Mathgroup,

A list of {x, y} values supplied to ListPlot, with PlotJoined -> True,
sensibly joins the points in the order of the list. Sometimes I produce
points that lie on a set of smooth curves but do not produce the points in
any particular order. How can I join the points to form a line
intelligently, for example, joining each point to its nearest neighbour?

An example. I solve for the roots of a polynomial with a parameter g that I
vary. I convert the complex values to {x,y} pairs. I then plot using
ListPlot which clearly shows that the roots lie along definite curves. How
can I join the points up to make the curves lines?

data = {Re[#], Im[#]} & /@ Flatten[Table[s /. NSolve[s^10 + g^10 (1 + s) ==
0, s], {g, 0, 2, 0.05}]];

ListPlot[ data];

Thanks

Hugh Goyder

```

• Prev by Date: Re: combining Log[] terms
• Next by Date: Re: Greatest element in list
• Previous by thread: Re: [Technical] Filters like GIMP?
• Next by thread: Re: Plot Joined Intelligently