cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
vikramavtar
Level I

Change Line Color and Line Style in all platforms

I am looking for a method to automatically change line color and style on all platforms (Distribution, variability, bivariate, oneway) for all columns with spec limits.

 

I loaded spec limits from "Limits Table" at "Analyze-Quality and Process-Manage Spec limits" and saved to column properties.

These spec limits are shown as reference lines in all platforms ((Distribution, variability, bivariate, oneway) which is great.

But, default line color (Blue) and style are not ideal.

 

Is there a way to automatically change line color and style for all columns ?

I can manually line color and style one at a time within each platforms, but that is too manual when trying to create hundreds of charts.

 

I am using JMP 16.1.0

 

Thank you

Vikram

 

5 REPLIES 5
jthi
Super User

Re: Change Line Color and Line Style in all platforms

I don't think you can set any specific color for spec limits column property which would apply to all platforms. You can attempt to create a script which you could run when you want to recolor all the spec limits in the open report(s). This is most like quite annoying to do as platforms do not handle spec limits in same way.  

 

Here is a wish list item related to thisA preference for adjusting the default color and thickness of Spec Limit lines in graphs 

-Jarmo
vikramavtar
Level I

Re: Change Line Color and Line Style in all platforms

Can you please give me sample script that can recolor and change reference line style for all the spec limits in the open report(s) ?
Just looking for ideas / starting point.
Thank you

jthi
Super User

Re: Change Line Color and Line Style in all platforms

Which platforms? Do they have to be spec limits or could you create new lines on top of them? Are the reports created via a script or does it have to work with any report user has created manually?

-Jarmo
vikramavtar
Level I

Re: Change Line Color and Line Style in all platforms

Ideally all of these platforms ((Distribution, variability, bivariate, oneway.

 

New lines on top of spec limits is ok, but please note that spec limits in my data table are already saved as column property.

 

Ideally, looking to update line colors and styles for any report user creates manually.

Thanks.

 

jthi
Super User

Re: Change Line Color and Line Style in all platforms

Some platforms use ref lines and some use graphic scripts for this.

Distribution, Graph Builder, One Way, Variability Chart - use ref lines

jthi_0-1732890995385.png

jthi_3-1732891122812.png

jthi_2-1732891087391.png

jthi_4-1732891179330.png

Process Capability histogram - uses Graphic Script:

jthi_1-1732891049697.png

 

I will only handle the ref lines:

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

ml = dt << Manage Limits(
	Process Variables(dt << Get Column Group("Processes")),
);
ml << Show Limits All;
ml << Save to Column Properties;
ml << Close Window;

dt << Distribution(
	Stack(1),
	Continuous Distribution(
		Column(:NPN1),
		Horizontal Layout(1),
		Vertical(0),
		Process Capability(Use Column Property Specs)
	)
);

// "Tool script" starts from here
Names Default To Here(1);
abs = Current Report() << XPath("//AxisBox");

idx = 0;
For Each({ab}, abs,
	s = ab << get script;
	For Each({cur_s}, s,
		If(Head Name(cur_s) == "Add Ref Line",
			l = Substitute(Name Expr(cur_s), Expr(Add Ref Line()), Expr(List()));
			If(Contains(l, "LSL") | Contains(l, "Target") | Contains(l, "USL"),
				// this isn't documented
				idx++;
				Eval(EvalExpr(
					ab << Update Ref Line(1, Expr(idx), "Solid", "Orange", l[4], 3);
				));
			);
		);
	);
);

I does require some testing and I will most likely turn this into add-in when I have bit of time

-Jarmo