cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Thomas1
Level V

How to create an CDF plot in Graph Builder

What would be the best way to create a CDF plot in Graph Builder, comparable to Fit Y by X (CDF / CumProb), but with the functionality of Graph Builder like Overlay, Group, Color etc.?

12 REPLIES 12
hogi
Level XIII

Re: How to create an CDF plot in Graph Builder

Concerning CDF plot in Graph Builder, please refer to how to make cumulative probability plots in JMP? 

hogi
Level XIII

Re: How to create an CDF plot in Graph Builder

And here is a wish from 2022 to directly Add CDFs to Graph Builder by @BHarris .

hogi
Level XIII

Re: How to create an CDF plot in Graph Builder

From the discussion there:

 

hogi_0-1725427551528.png



dt = Open( "$DOWNLOADS/CDF_Data.jmp" );
new column("one_Nr", formula(1));


dt << Graph Builder(
	Variables(
		X( :Data ),
		Y( :"Cumulative Probability[Data]"n ),
		Y( :one_Nr, Position( 1 ) ),
		//Y( :Prob DataX, Position( 1 ) ) // enable after saving the data to the table
	),
	Elements(
		Points( X, Y( 1 ), Y( 3 ), Legend( 11 ) ),
		Points( X, Y( 2 ), Legend( 2 ), Summary Statistic( "Cumulative Percent" ) ),
		Line(
			X,
			Legend( 3 ),
			Connection( "Step" ),
			Summary Statistic( "Cumulative Percent" ),
			Interval Style( "Band" )
		)
	),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				11,
				Properties(
					1,
					{Marker( "FilledCircle" ), Marker Size( 6 )},
					Item ID( "Prob Data", 1 )
				)
			), Legend Model(
				2,
				Properties( 0, {Marker Size( 10 )}, Item ID( "Sum %(one_Nr)", 1 ) )
			), Legend Model(
				3,
				Properties( 0, {Line Color( 8 )}, Item ID( "Count", 1 ) )
			)}
		)
	)
);


If the missing horizontal line and first step from the left edge at 0 to the first point's x-value and up (link ) is OK for you,
the approach via "Line" + "Cumulative Percent" (purple line) is a nice shortcut.

Recommended Articles