[Date Index]
[Thread Index]
[Author Index]
Re: plot discrete spectrum
*To*: mathgroup at smc.vnet.net
*Subject*: [mg23323] Re: [mg23266] plot discrete spectrum
*From*: Murray Eisenberg <murray at math.umass.edu>
*Date*: Tue, 2 May 2000 00:43:06 -0400 (EDT)
*Organization*: Mathematics & Statistics, Univ. of Mass./Amherst
*References*: <d0.536c34f.263f61b6@aol.com>
*Sender*: owner-wri-mathgroup at wolfram.com
Ahh ... that does a nicer job. I'll fool around now to encapsulate the
whole thing in a single function that filters the options so as to send
the appropriate ones to the ListPlot expression and the plt/.
{Point....) expression in the final Show.
BobHanlon at aol.com wrote:
>
> It is not that the PointSize is ignored, but rather that there are no points
> since they were all replaced by lines. I misunderstood what you desired. For
> both points and lines, you could use
>
> plt = (ListPlot[data, PlotStyle -> {PointSize[0.015], RGBColor[1, 0, 0]},
> DisplayFunction -> Identity, PlotRange -> All] /.
> Point[{x_, y_}] :> Sequence[Point[{x, y}], Line[{{x, y}, {x, 0}}]]);
>
> Although this makes the points and the lines the same color. If you want the
> points and lines to be distinct colors then you could use
>
> plt = ListPlot[data, PlotStyle -> {PointSize[0.015], RGBColor[1, 0, 0]},
> DisplayFunction -> Identity, PlotRange -> All] ;
>
> Show[{plt,
> plt /. {Point[{x_, y_}] :> Line[{{x, y}, {x, 0}}],
> RGBColor[1, 0, 0] :> RGBColor[0, 0, 1]}},
> DisplayFunction -> $DisplayFunction, Frame -> True];
>
> In a message dated 5/1/2000 11:15:27 AM, murray at math.umass.edu writes:
>
> >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
> >
>
> 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: plot discrete spectrum**
Next by Date:
**Re: Follow-up on Do[] Question**
Previous by thread:
**Re: plot discrete spectrum**
Next by thread:
**Re: plot discrete spectrum**
| |