Re: plot discrete spectrum
- To: mathgroup at smc.vnet.net
- Subject: [mg23301] Re: [mg23266] plot discrete spectrum
- From: BobHanlon at aol.com
- Date: Sun, 30 Apr 2000 21:13:52 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
data = Table[{x = 4Pi(Random[] - .5), Sin[x]/x}, {20}]; plt = (ListPlot[data, PlotStyle -> RGBColor[0, 0, 1], DisplayFunction -> Identity, PlotRange -> All] /. Point[{x_, y_}] :> Line[{{x, y}, {x, 0}}]); Show[plt, DisplayFunction -> $DisplayFunction, Frame -> True]; In a message dated 4/29/2000 10:29:33 PM, murray at math.umass.edu writes: >Is there an easy way to do a ListPlot[{{{x1, y1}, {x2, y2}, ..., {xn, >yn}} in which each a perpendicular is dropped from each dot to the >horizontal axis? > >Of course, when can combine the ListPlot with a Graphics object >consisting of line segments. I prefer a way that avoids using graphics >primitives directly. > >The sort of plot I want is what's usually done to display, for example, >the energy spectrum of a Fourier series. Bob BobHanlon at aol.com