Here's an example with 4 Poisson distributions:
New Table( "Poisson CDF Example",
Add Rows( 200 ),
New Script(
"Poisson CDF Comparison",
Graph Builder(
Size( 526, 452 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Probability ), Overlay( :Distribution ) ),
Elements( Line( X, Y, Legend( 19 ), Connection( "Step" ) ) ),
SendToReport(
Dispatch(
{},
"X",
ScaleBox,
{Min( -1 ), Max( 12 ), Inc( 10 ), Minor Ticks( 1 )}
)
)
)
),
New Column( "Distribution",
Character,
"Nominal",
Formula( "Pois(" || Char( :Lambda ) || ")" )
),
New Column( "Lambda",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( If( Row() < 51, 0.5, Row() < 101, 2, Row() < 151, 4, 1.25 ) )
),
New Column( "X",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Sequence( -1, 48, 1, 1 ) )
),
New Column( "Probability",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Poisson Distribution( :Lambda, :X ) ),
Set Selected
)
)
The key with a step function CDF is to turn off the smoother line in Graph Builder, and connect the points using Line. Then change Connection in the control panel to "Step".
-- Cameron Willden