//The code below uses Journal Box() and Picture Box() to create a custom display of saved journals and pictures.
//Note you can use a statement like jrn_src = trend_cc1 << get journal, even when trend_cc1 is invisible
//before saving them.
SavePath = "c:\temp\";
dt = open("$sample_data\semiconductor capability.jmp");
dt:lot_id << Set Property(
"Value Ordering",
{"lot1", "lot2", "lot3", "lot4", "lot5", "lot6", "lot7", "lot8", "lot9",
"lot10", "lot11", "lot12", "lot13"}
);
dt << Color by Column(:lot_id);
// create trend charts
trend_cc1 = Control Chart(
Phase( :lot_id ),
KSigma( 3 ),
Show Limits Legend( 0 ),
Chart Col(
:NPN1,
Levey Jennings(
Test 1( 1 )
)
),
SendToReport(
Dispatch(
{"Levey Jennings of NPN1"},
"1",
ScaleBox,
{Format( "Best", 10 ), Min( 0.5 ), Max( 1456 ), Inc( 100 ),
Minor Ticks( 0 )}
),
Dispatch(
{"Levey Jennings of NPN1"},
"Levey Jennings Chart",
FrameBox,
{Frame Size( 546, 182 )}
)
)
);
trend_cc2 = Control Chart(
Phase( :lot_id ),
KSigma( 3 ),
Show Limits Legend( 0 ),
Chart Col(
:PNP1,
Levey Jennings(
Test 1( 1 )
)
),
SendToReport(
Dispatch(
{"Levey Jennings of PNP1"},
"1",
ScaleBox,
{Format( "Best", 10 ), Min( 0.5 ), Max( 1456 ), Inc( 100 ),
Minor Ticks( 0 )}
),
Dispatch(
{"Levey Jennings of PNP1"},
"Levey Jennings Chart",
FrameBox,
{Frame Size( 546, 182 )}
)
)
);
Trend_rpt = trend_cc1 << Report; //trend_cc1 is a control chart object.
Trend_rpt << Save Journal(SavePath || "journal1.jrn");
trend_cc1<< Close Window;
Trend_rpt = trend_cc2 << Report; //trend_cc2 is a second control chart object.
Trend_rpt << Save Journal(SavePath || "journal2.jrn");
trend_cc2 << Close Window;
//Later in script, after the report and bivariate (or control chart) objects no longer exist:
//JMP Example from Functions >> Display >> Picture Box()
pict = If( Host is( Windows ),
Open(
"$JMP_HOME/Support Files English/Tip of the Day/images/tip8-1.gif",
png
)
);
// you can read the JRN file as text or as a journal
//If you read as a journal file you will also have 2 journal
//windows open, you can open them invisible
ob1_jrn_txt = Load Text File (SavePath || "journal1.jrn", Invisible);
ob2_jrn_txt = Load Text File(SavePath || "journal2.jrn", Invisible);
nw = New Window( "Example",
ob = OutlineBox("lay 'em out & stack 'em up",
HListBox(
Picture Box( pict ),
VlistBox(Journal Box(ob1_jrn_txt), JournalBox(ob2_jrn_txt)
))));
ob1_jrn = Open (SavePath || "journal1.jrn");
ob2_jrn = Open(SavePath || "journal2.jrn");
ob1_jrn_src = ob1_jrn << get journal;
ob2_jrn_src = ob2_jrn << get journal;
//now close journal window objects
ob1_jrn << close window;
ob2_jrn << close window;
ob << append( HlistBox(Journal Box(ob1_jrn_src), JournalBox(ob2_jrn_src)
));