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
mvanderaa1
Level IV

Life distribution line properties cannot be changed (JMP17 related?)

I just started using JMP 17 (not sure this is related), but in some instances I can not change any properties of the lines in the life distribution platform.

I attached my datatable with a script to generate a weibull plot. Note that I'm initially changing the colors in the script to reflect the row states, which apparently works. but once the platform is open I cannot change anything anymore. In the script I already try to set the line width to 3, but this also doesn't work (this did work with this script in JMP16.2).

 

demo.gif

1 ACCEPTED SOLUTION

Accepted Solutions
mvanderaa1
Level IV

Re: Life distribution line properties cannot be changed (JMP17 related?)

edit:

Below code does what I want, it's not very pretty compared to JMP16 but I guess it works.

dt = open ("$SAMPLE_DATA\reliability\blenders.jmp");
New Column( "By",
		Character,
		"Nominal",
		Set Selected,
		Set Values(
			{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
			"A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B",
			"B", "B", "B", "B", "B", "B", "B", "B", "A", "A", "A", "A", "A", "A",
			"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
			"A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B",
			"B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B",
			"B", "B", "B", "B", "B", "B"}
		)
	);

ld = dt << Life Distribution(
	Perspective( Compare Groups ),
	Y( :Time Cycles ),
	Grouping( :Group ),
	Confidence Interval Method( Wald ),
	Select Distribution( Distribution, Weibull ),
	Select Scale( Weibull ),
	Tabbed Report( 0 ),
	By("By")
	);	

Summarize( uniqueGroups = by( "Group" ) );
numGroups = N Items( uniqueGroups );
Summarize( uniqueBy = by( "By" ) );
numPlatforms = N Items( uniqueBy );

For( i = 1, i < numPlatforms + 1, i++,
	For( j = 1, j < numPlatforms + 1, j++,
	ld[i] << SendToReport(Dispatch(
	"Compare Distribution",
	"11111",
	ScaleBox,
	{Legend Model(
		11111,
		Properties(
			0,
			{Line Color( 6 ), Line Style( "Dashed" ), Line Width( 6 )}, // <-- Change line properties
			Item ID( Eval( "Group=" || uniqueGroups[j] ), 1 )
		)
	);
	};
	);				
);
);
);

View solution in original post

10 REPLIES 10

Re: Life distribution line properties cannot be changed (JMP17 related?)

I never performed these changes before, but you can accomplish them with JMP 17. I manually customized the line for the estimate and then I saved the script. Here it is:

 

Names Default to Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

obj = dt << Life Distribution(
	Y( :weight ),
	<<Fit Weibull,
	Confidence Interval Method( Wald ),
	<<Set Scale( Weibull ),
	Interval Type( Pointwise ),
	Show Event Plot Frequency Label( 0 ),
	SendToReport(
		Dispatch(
			{"Compare Distributions"},
			"Life Distribution",
			FrameBox,
			{DispatchSeg(
				CustomStreamSeg( 1 ),
				{Line Style( "Dotted" ), Line Width( 5 )}
			)}
		),
		Dispatch(
			{"Compare Distributions"},
			"Distribution Profiler",
			OutlineBox,
			{Set Summary Behavior( "Collapse" )}
		),
		Dispatch(
			{"Statistics"},
			"",
			ListBox,
			{Set Summary Behavior( "Collapse" )}
		)
	)
);

Re: Life distribution line properties cannot be changed (JMP17 related?)

I'm able to make changes to the graph when I choose the "Life Distribution" tab in the Life Distribution platform, but I'm not able to make changes when I select the "Compare Groups" tab of the Life Distribution platform. This might explain why @Mark_Bailey  and @mvanderaa are getting different results, as Mark's example uses the "Life Distribution" tab. Likewise, in the Fit Life by X platform, I cannot make changes to the line weights or colors (I can change the color of the points, though). I wonder if this is desired behavior from the Developers.

 

A potential workaround could be had in the regular Distribution platform, where you could fit a weibull distribution, look at QQ plots, then customize the plots separately, after which you could copy frame contents from one graph and paste them in the other to have them both overlaid on one graph. The script below gets this copy/paste ready to do on the data table you supplied (I didn't include the copy/paste bit as the graphs look messy in the final product--so much so that I almost didn't include this as a possible workaround).

Distribution(
	SendToByGroup( {:Side == "Bottom"} ),
	Continuous Distribution(
		Column( :Y ),
		Histogram( 0 ),
		Fit Weibull( QQ Plot( 1 ) )
	),
	Histograms Only,
	By( :Side ),
	SendToByGroup(
		{:Side == "Bottom"},
		SendToReport(
			Dispatch(
				{"Distributions Side=Bottom", "Y"},
				"Compare Distributions",
				OutlineBox,
				{Close( 1 )}
			)
		)
	),
	SendToByGroup(
		{:Side == "Top"},
		SendToReport(
			Dispatch(
				{"Distributions Side=Top", "Y"},
				"Compare Distributions",
				OutlineBox,
				{Close( 1 )}
			),
			Dispatch(
				{"Distributions Side=Top", "Y", "Fitted Weibull Distribution",
				"QQ Plot"},
				"FitDistributions",
				FrameBox,
				{DispatchSeg( Line Seg( 1 ), {Line Color( "Green" )} ),
				DispatchSeg( Line Seg( 2 ), {Line Color( "Green" )} )}
			)
		)
	)
)

 

 

 

 

peng_liu
Staff

Re: Life distribution line properties cannot be changed (JMP17 related?)

You are right. The behavior has changed in JMP17. In JMP17, legends are clickable and corresponding graphical elements can hide/show. That probably led to the undesired behavior change in Customize.

But for now, I suggest using legend to customize. I.e. right click a legend, a popup menu will show up to let you change color, line style, line width.

mvanderaa1
Level IV

Re: Life distribution line properties cannot be changed (JMP17 related?)

Hi, in JMP 16 I was generating these graphs automatically. Right clicking the legend and changing all line widths manually is therefore not an option.

Is there not a way to send this line width property to the legendBox?

Re: Life distribution line properties cannot be changed (JMP17 related?)

Yes, it's possible via scripting. Line 33 of the code below has an example.

dt = open ("$SAMPLE_DATA\reliability\blenders.jmp");

ld = dt << Life Distribution(
	Perspective( Compare Groups ),
	Y( :Time Cycles ),
	Grouping( :Group ),
	Confidence Interval Method( Wald ),
	Select Distribution( Distribution, Weibull ),
	Select Scale( Weibull ),
	Tabbed Report( 0 ),
	SendToEmbeddedScriptable(
		Dispatch(
			{"Individual Group", "Life Distribution Group=Automatic"},
			{Y( :Time Cycles ), <<Fit Weibull, Confidence Interval Method( Wald ),
			Interval Type( Pointwise ), Show Event Plot Frequency Label( 0 )}
		),
		Dispatch(
			{"Individual Group", "Life Distribution Group=Manual"},
			{Y( :Time Cycles ), <<Fit Weibull, Confidence Interval Method( Wald ),
			Interval Type( Pointwise ), Show Event Plot Frequency Label( 0 )}
		)
	),
	SendToReport(
		Dispatch(
			{"Life Distribution - Compare Groups - Time Cycles",
			"Compare Distribution"},
			"11111",
			ScaleBox,
			{Legend Model(
				11111,
				Properties(
					0,
					{Line Color( 6 ), Line Style( "Dashed" ), Line Width( 6 )}, // <-- Change line properties
					Item ID( "Group=Automatic", 1 )
				)
			)}
		),
		Dispatch(
			{"Life Distribution - Compare Groups - Time Cycles", "Individual Group",
			"Life Distribution Group=Automatic", "Compare Distributions"},
			"Distribution Profiler",
			OutlineBox,
			{Set Summary Behavior( "Collapse" )}
		),
		Dispatch(
			{"Life Distribution - Compare Groups - Time Cycles", "Individual Group",
			"Life Distribution Group=Automatic", "Statistics"},
			"",
			ListBox,
			{Set Summary Behavior( "Collapse" )}
		),
		Dispatch(
			{"Life Distribution - Compare Groups - Time Cycles", "Individual Group",
			"Life Distribution Group=Manual", "Compare Distributions"},
			"Distribution Profiler",
			OutlineBox,
			{Set Summary Behavior( "Collapse" )}
		),
		Dispatch(
			{"Life Distribution - Compare Groups - Time Cycles", "Individual Group",
			"Life Distribution Group=Manual", "Statistics"},
			"",
			ListBox,
			{Set Summary Behavior( "Collapse" )}
		)
	)
)
mvanderaa1
Level IV

Re: Life distribution line properties cannot be changed (JMP17 related?)

Hi, thanks for the suggestion but your code has hard coded names in it (group=Automatic is in the dispatch). These column values are not known beforehand so in terms of automated scripting this doesn't work.

 

Can we use the box path or xpath for this to remove the naming dependency? Below code does not work when I place it after your script (I took out some of your dispatches for readability)

 

dt = open ("$SAMPLE_DATA\reliability\blenders.jmp");

ld = dt << Life Distribution(
	Perspective( Compare Groups ),
	Y( :Time Cycles ),
	Grouping( :Group ),
	Confidence Interval Method( Wald ),
	Select Distribution( Distribution, Weibull ),
	Select Scale( Weibull ),
	Tabbed Report( 0 ),
	);	

Report(ld)["Compare Distribution",AxisBox(2)]<<{Min(200)}; // Changing x-axis range works as expected

Report(ld)["Compare Distribution",LegendBox(1)] << {Line Width(3)}; // doesn't work, wrong syntax?

legendBoxes = 	Report( ld )["Life Distribution - Compare Groups - Time Cycles"]["Compare Distribution"] <<
	Xpath( "//LegendBox" );
legendBoxes << {"Line Width",3}; // Also doesn't work

 

 

Re: Life distribution line properties cannot be changed (JMP17 related?)

I'm not sure how you'd use xpath for this, as the LegendBox object doesn't appear to accept any messages related to line width. Perhaps a different approach might work: how do you know which column to put in the Y category during your analysis? Is it always in the same spot, does it always have something special in the column title? If there's a way to know which column to use, then that could be baked into your script, and the first method might work.

mvanderaa1
Level IV

Re: Life distribution line properties cannot be changed (JMP17 related?)

edit:

Below code does what I want, it's not very pretty compared to JMP16 but I guess it works.

dt = open ("$SAMPLE_DATA\reliability\blenders.jmp");
New Column( "By",
		Character,
		"Nominal",
		Set Selected,
		Set Values(
			{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
			"A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B",
			"B", "B", "B", "B", "B", "B", "B", "B", "A", "A", "A", "A", "A", "A",
			"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
			"A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B",
			"B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B",
			"B", "B", "B", "B", "B", "B"}
		)
	);

ld = dt << Life Distribution(
	Perspective( Compare Groups ),
	Y( :Time Cycles ),
	Grouping( :Group ),
	Confidence Interval Method( Wald ),
	Select Distribution( Distribution, Weibull ),
	Select Scale( Weibull ),
	Tabbed Report( 0 ),
	By("By")
	);	

Summarize( uniqueGroups = by( "Group" ) );
numGroups = N Items( uniqueGroups );
Summarize( uniqueBy = by( "By" ) );
numPlatforms = N Items( uniqueBy );

For( i = 1, i < numPlatforms + 1, i++,
	For( j = 1, j < numPlatforms + 1, j++,
	ld[i] << SendToReport(Dispatch(
	"Compare Distribution",
	"11111",
	ScaleBox,
	{Legend Model(
		11111,
		Properties(
			0,
			{Line Color( 6 ), Line Style( "Dashed" ), Line Width( 6 )}, // <-- Change line properties
			Item ID( Eval( "Group=" || uniqueGroups[j] ), 1 )
		)
	);
	};
	);				
);
);
);
Craige_Hales
Super User

Re: Life distribution line properties cannot be changed (JMP17 related?)

Sorry, this was stuck in the spam filter.

I use the blinking editor cursor on the ( or ) to find the matching paren. And frequently reformat when the parens are matched using control-M, just to see the actual nesting visually.

quick reference card PDF download 

 

Craige