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
Tom_P
Level II

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

 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!

Recommended Articles