       Re: Option for continuous plot

• To: mathgroup at smc.vnet.net
• Subject: [mg72933] Re: [mg72890] Option for continuous plot
• From: "Chris Chiasson" <chris at chiasson.name>
• Date: Thu, 25 Jan 2007 07:47:37 -0500 (EST)
• References: <200701241058.FAA14942@smc.vnet.net>

```showPoissonProcess[\[Lambda]_,n_,opts___]:=
With[{pp=poissonProcess[\[Lambda],n]},
Show[Graphics[{AbsoluteThickness[1.5],
Line@ReleaseHold@
Table[Hold[Sequence][{pp[[i]],i-1},{pp[[i+1]],i-1}],{i,1,n}]}],
Axes\[Rule]True,opts]]

On 1/24/07, Virgil Stokes <vs at it.uu.se> wrote:
> I have defined the following two functions:
>
> poissonProcess[ë_,n_] := FoldList[Plus,0,Table[-1/ë Log[1-Random[]],{n}]]
>
> showPoissonProcess[ë_,n_,opts___] := With[{pp = poissonProcess[ë,n]},
> Show[Graphics[{AbsoluteThickness[1.5],Table[Line[{{pp[[i]],i-1},{pp[[i+1]],i-1}}],{i,1,n}]}],
> Axes\[Rule]True,opts]];
>
> for plotting a Poisson process; i.e.,
>
> SeedRandom;
> showPoissonProcess[4, 20, AspectRatio -> 0.3];
>
> does indeed plot this process. However, I would like to have an option
> that would allow for these horizontal lines to be connected; i.e.,
> produce a continuous curve.
>
> Is there a easy way to do this?
>
> Thanks,
> V. Stokes
>
>

--
http://chris.chiasson.name/

```

• Prev by Date: Re: Option for continuous plot
• Next by Date: when draw the piechart,how to write the label outside the piechart
• Previous by thread: Option for continuous plot
• Next by thread: Re: Option for continuous plot