MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: plot discrete spectrum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23336] Re: [mg23266] plot discrete spectrum
  • From: "Kevin J. McCann" <kevinmccann at home.com>
  • Date: Thu, 4 May 2000 02:59:06 -0400 (EDT)
  • Organization: @Home Network
  • References: <a0.3e9ab1a.263e0714@aol.com> <PXsP4.7$7E6.787@ralph.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Murray,

I think that's because there are no points left after

            /.Point[{x_, y_}] :> Line[{{x, y}, {x, 0}}]);

See if this does what you want:

data = Table[{x = 4*Pi*(Random[] - 0.5), Sin[x]/x}, {20}];

plt1 = ListPlot[data, PlotStyle -> RGBColor[0, 0, 1], DisplayFunction ->
Identity,
     PlotRange -> All] /. Point[{x_, y_}] :> Line[{{x, y}, {x, 0}}];

plt2 = ListPlot[data, PlotStyle -> {RGBColor[1, 0, 0],
AbsolutePointSize[4]},
    DisplayFunction -> Identity, PlotRange -> All];

Show[plt1, plt2, DisplayFunction -> $DisplayFunction, Frame -> True];


"Murray Eisenberg" <murray at math.umass.edu> wrote in message
news:PXsP4.7$7E6.787 at ralph.vnet.net...
> That's an interesting way to do it.  But if, instead of the PlotStyle
> optioon you prescribed, I use instead, say,
>
>    PlotStyle -> {PointSize[0.015], Red}
>
> then the PointSize seems to be ignored.
>
> BobHanlon at aol.com wrote:
> >
> > 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
>
> --
> Murray Eisenberg                     murray at math.umass.edu
> Mathematics & Statistics Dept.       phone 413 549-1020 (H)
> Univ. of Massachusetts                     413 545-2859 (W)
> Amherst, MA 01003-4515
>
>



  • Prev by Date: Re: Follow-up on Do[] Question
  • Next by Date: RE:
  • Previous by thread: Re: plot discrete spectrum
  • Next by thread: Re: plot discrete spectrum