cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

How to Add Row Legend to Control Chart Report & Hide Data Table

Tom_P
Level II

 Hello,

 

Once i've created a control chart script, how do i:

1) Add a Row Legend to the PLOTS window based on TOOL?

2) Hide the data table, but keep the PLOTS screen visible?


 

dt = Open Database( "Database1",
"SELECT
           MEAS1,
           TEST_DATE,
           TOOL
FROM Data_Table_1
where  Test_Date > sysdate - 365
            order by test_date asc
",
"dt"
);

dt << Color by Column( :TOOL, Color Theme( "JMP Dark" ) );

New Window( "PLOTS",
V List Box(
dt << Control Chart(
Marker Size( 4 ),
Sample Label( :TEST_DATE ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col(
:MEAS1, Individual Measurement( Show Zones( 3 ), Shade Zones( 1 ), Sigma( 1.73e+17 ), Avg( 1.20e+18 ), LCL( 6.77e+17 ), UCL( 1.73e+18 ) )
))));

Try( dt << Close Window );

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User


Re: How to Add Row Legend to Control Chart Report & Hide Data Table

Below is a corrected script.  The corrections are documented in the Scripting Index

     Help==>Scripting Index

dt = Open Database(
	"Database1",
	"SELECT
           MEAS1,
           TEST_DATE,
           TOOL
FROM Data_Table_1
where  Test_Date > sysdate - 365
            order by test_date asc
",
	"dt"
);


dt << Color by Column( :sex, Color Theme( "JMP Dark" ) );

New Window( "PLOTS",
	V List Box(
		cc = dt << Control Chart(
			Marker Size( 4 ),
			Sample Label( :TEST_DATE ),
			Group Size( 1 ),
			KSigma( 3 ),
			Chart Col(
				:MEAS1,
				Individual Measurement(
					Show Zones( 3 ),
					Shade Zones( 1 ),
					Sigma( 1.73e+17 ),
					Avg( 1.20e+18 ),
					LCL( 6.77e+17 ),
					UCL( 1.73e+18 )
				)
			)
		)
	)
);
report(cc)[framebox(1)]<< row legend("TOOL");
dt<<show window(0);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User


Re: How to Add Row Legend to Control Chart Report & Hide Data Table

Below is a corrected script.  The corrections are documented in the Scripting Index

     Help==>Scripting Index

dt = Open Database(
	"Database1",
	"SELECT
           MEAS1,
           TEST_DATE,
           TOOL
FROM Data_Table_1
where  Test_Date > sysdate - 365
            order by test_date asc
",
	"dt"
);


dt << Color by Column( :sex, Color Theme( "JMP Dark" ) );

New Window( "PLOTS",
	V List Box(
		cc = dt << Control Chart(
			Marker Size( 4 ),
			Sample Label( :TEST_DATE ),
			Group Size( 1 ),
			KSigma( 3 ),
			Chart Col(
				:MEAS1,
				Individual Measurement(
					Show Zones( 3 ),
					Shade Zones( 1 ),
					Sigma( 1.73e+17 ),
					Avg( 1.20e+18 ),
					LCL( 6.77e+17 ),
					UCL( 1.73e+18 )
				)
			)
		)
	)
);
report(cc)[framebox(1)]<< row legend("TOOL");
dt<<show window(0);
Jim
Tom_P
Level II


Re: How to Add Row Legend to Control Chart Report & Hide Data Table

Awesome!

Thanks a lot!