Re: plotting cadlag point process
- To: mathgroup at smc.vnet.net
- Subject: [mg30677] Re: [mg30661] plotting cadlag point process
- From: BobHanlon at aol.com
- Date: Sat, 8 Sep 2001 02:22:18 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 2001/9/3 8:57:38 PM, mrMICE.fi at cbs.dk writes:
>I need to make plots of cadlag point process, as a simple example,
>the homogenous Poisson process. I have a data file with jump times
>and sizes so it looks like this
>
> .____
>
> .______o
>
>
>______o
>
>there the O is a open dot and . is a filled dot. So the data could
>look like this (of course not the Poisson process)
>
> 0 0
> 1.9 2
> 2.1 5
> 3.2 3
>
>is there a simple way to make this plot.
>
Needs["Graphics`Colors`"];
Although you gave the data in sorted order, you might want to sort it to
handle unsorted data sets.
data = Sort[
{{0,0}, {1.9, 2}, {2.1, 5}, {3.2, 3}}];
n=0;
Show[Graphics[{
Blue,
AbsolutePointSize[7],
Point[{#[[1]], n}],
Green,
Line[{{#[[1]], n}, {Plus@@#, n}}],
Red,
AbsolutePointSize[4],
Point[{Plus@@#, n++}]}& /@ data],
AspectRatio -> 1/4,
PlotRange -> {-0.25, Length[data]}];
Bob Hanlon
Chantilly, VA USA