cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
shaira
Level IV

CDF customization in JMP14.0.0

Hi,

My colleague upgraded from JMP11 to JMP14.0.0 and we noticed some differences with CDF (from Bivariate plot) customization.

1. We can't change the line style by right clicking graph and selecting "Customize...". There is GUI for changing it but even if we click "Apply" or "OK", it is not applied. The only way to change the line style is to click on the legend itself.x

2. The more important one. I cannot copy the line styles when I  click Edit>Copy Customizations. This is quite important since I have a script (see below) that applies dashes based on grouping column. I then copy and paste it to all graphs.

 

Is there a way to get around this in JMP14? Without this feature, I am not sure how to automate the line style customization in CDF plots.

 

"/*JMPType:CustomizationsScript*/{Frame Size(220, 170), Line Width Scale(3),";
Summarize( A = by( groupcol ) );
B = groupcol << get property( value ordering );
If( Is Empty( B ), GroupList = A, GroupList = B);
Show( GroupList );
For( i = 1, i <= N Items( GroupList ), i++,
				If(
					Left(Right( GroupList[i], 4 ), 1 ) == "_+", CDFStyle = "Dashed",
					Left(Right( GroupList[i], 4 ), 1 ) == "-",CDFStyle = "DashDotDot",
					Continue()
 );
CDFcode = CDFcode || "DispatchSeg(LinesSeg(" || Char( i ) ||"), {Line Style(\!"" || CDFStyle || "\!")}),";
			);
CDFcode = Substr( CDFcode, 1, Length( CDFcode ) - 1 ) || "}";
Write( "" );
Write( "" || CDFcode );
Write( "" );
Caption( "Done! Check log." );

Thanks a lot,

Shaira

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: CDF customization in JMP14.0.0

Below is a script that in JMP 14 I created by first running a Fit Y by X, then generating the CDF plots, and then manually changing the line style.  Then to get the script that is required to change the Line Style, I saved the script.  I think these are the code changes you will need..........if I am interpreting your question correctly

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
Oneway(
	Y( :height ),
	X( :sex ),
	CDF Plot( 1 ),
	SendToReport(
		Dispatch(
			{},
			"222",
			ScaleBox,
			{Legend Model( 1, Properties( 1, {Line Style( "Dotted" )}, Item ID( "M", 1 ) ) )}
		),
		Dispatch( {}, "CDF Plot", OutlineBox, {SetHorizontal( 1 )} )
	)
);
Jim

View solution in original post

gzmorgan0
Super User (Alumni)

Re: CDF customization in JMP14.0.0

Jim beat me to it.  The CDF plot is created the Oneway platform (or Distribution).  The colors and line types are controlled by the Legend Model, similar to graph builder. Below is a script for multiple variables.

 

FYI, I think the first matching conditional statement in your script had an error: shouldn't it be Right( Left (), 2 ) == "_+ " ?

 

 

onew = Oneway(
	Y( :weight, weight ),
	X( :sex ),
	All Graphs( 0 ),
	CDF Plot( 1 ),
	SendToReport(
		Dispatch(
			{},
			"222",
			ScaleBox,
			{Legend Model(
				1,
				Properties( 0, {Line Color( 42 )}, Item ID( "F", 1 ) ),
				Properties( 1, {Line Style( "DashDotDot" )}, Item ID( "M", 1 ) )
			)}
		),
		Dispatch( {}, "CDF Plot", OutlineBox, {SetHorizontal( 1 )} )
	)
);

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: CDF customization in JMP14.0.0

Below is a script that in JMP 14 I created by first running a Fit Y by X, then generating the CDF plots, and then manually changing the line style.  Then to get the script that is required to change the Line Style, I saved the script.  I think these are the code changes you will need..........if I am interpreting your question correctly

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
Oneway(
	Y( :height ),
	X( :sex ),
	CDF Plot( 1 ),
	SendToReport(
		Dispatch(
			{},
			"222",
			ScaleBox,
			{Legend Model( 1, Properties( 1, {Line Style( "Dotted" )}, Item ID( "M", 1 ) ) )}
		),
		Dispatch( {}, "CDF Plot", OutlineBox, {SetHorizontal( 1 )} )
	)
);
Jim
gzmorgan0
Super User (Alumni)

Re: CDF customization in JMP14.0.0

Jim beat me to it.  The CDF plot is created the Oneway platform (or Distribution).  The colors and line types are controlled by the Legend Model, similar to graph builder. Below is a script for multiple variables.

 

FYI, I think the first matching conditional statement in your script had an error: shouldn't it be Right( Left (), 2 ) == "_+ " ?

 

 

onew = Oneway(
	Y( :weight, weight ),
	X( :sex ),
	All Graphs( 0 ),
	CDF Plot( 1 ),
	SendToReport(
		Dispatch(
			{},
			"222",
			ScaleBox,
			{Legend Model(
				1,
				Properties( 0, {Line Color( 42 )}, Item ID( "F", 1 ) ),
				Properties( 1, {Line Style( "DashDotDot" )}, Item ID( "M", 1 ) )
			)}
		),
		Dispatch( {}, "CDF Plot", OutlineBox, {SetHorizontal( 1 )} )
	)
);