Re: "LOLLIPOP" PLOTS FOR DISCRETE SEQUENCES

• To: mathgroup at smc.vnet.net
• Subject: [mg19279] Re: [mg19214] "LOLLIPOP" PLOTS FOR DISCRETE SEQUENCES
• From: "Tomas Garza" <tgarza at mail.internet.com.mx>
• Date: Thu, 12 Aug 1999 01:24:29 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```Maya Lemiel [lemiel at bangkok.com] wrote:

> I'm thinking of representing discrete-time sequences by means of
> "lollipop"
> plots, that is, vertical lines with filled circles on top.  Is there a
> Mathermatica function to meet this need or else can anybody out there
> suggest a straightforward way to implement it.

Suppose you have a sequence of points listA, e.g.:

In[1]:=
listA = Transpose[{{1, 2, 3}, {1, 4, 9}}]
Out[1]=
{{1, 1}, {2, 4}, {3, 9}}

The corresponding abscissas are:

In[2]:=
abscs = Transpose[{{1, 2, 3}, {0, 0, 0}}]
Out[2]=
{{1, 0}, {2, 0}, {3, 0}}

The lines joining the abscissas with the points are:

In[3]:=
Line /@ Transpose[{abscs, listA}]
Out[3]=
{Line[{{1, 0}, {1, 1}}], Line[{{2, 0}, {2, 4}}], Line[{{3, 0}, {3, 9}}]}

The "lollipops" can be obtained like this:

In[4]:=
Show[Graphics[Line /@ Transpose[{abscs, listA}]],
Epilog -> Table[Disk[listA[[j]], 0.035], {j, 1, 3}],
AspectRatio -> Automatic]

Tomas Garza
Mexico City

```

• Prev by Date: Re: PolynomialQ (wrong) behavior ?
• Next by Date: Re: ListPlot question
• Previous by thread: "LOLLIPOP" PLOTS FOR DISCRETE SEQUENCES
• Next by thread: PolynomialQ (wrong) behavior ?