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

how to combine 2 graphs i mean like overlaying one on the other

Hello everyone,

 

I am having two graphs individually and I would like to have one graph on the other.

I tried using combined windows and copy pasting frame contents but when I hover over the mouse to the pasted graph contents the values aren't popping can anyone help me out in solving this.

 

penalah_0-1623019172095.png

 

 

Thank you,

Hanuja 

3 REPLIES 3
txnelson
Super User

Re: how to combine 2 graphs i mean like overlaying one on the other

While it is easy to overlay graphs using Graph Builder, there is a problem with displaying Spec Limits when more than one columns is overalyed.  However, it is a simple process to add a little script that will add the reference lines.  Here is one way to do it

over.JPG

Names Default To Here( 1 );
dt = Open( "$sample_data/semiconductor capability.jmp" );

gb = Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :wafer ), Y( :NPN1 ), Y( :NPN2, Position( 1 ) ) ),
	Elements( Points( X, Y( 1 ), Y( 2 ), Legend( 8 ) ) )
);



// determine the columns to add limit reference lines from
theReport = Current Report();
theScript = Char( (theReport[Outline Box( 1 )] << get scriptable object) << get script );
theYColList = {};
While( Contains( theScript, "Y(:" ) != 0,
	theScript = Substr( theScript, Contains( theScript, "Y(:" ) + 3 );
	Insert Into( theYColList, Word( 1, theScript, ":)," ) );
);
// Create the reference lines
For( i = 1, i <= N Items( theYColList ),i++,
	specs = Column( theYColList[i] ) << get property( "spec limits" );
	If( Try( specs["USL"], "" ) != "",
		theReport[AxisBox( 2 )] << Add Ref Line( specs["USL"], "Dashed", black, theYColList[i] || " USL" )
	);
	If( Try( specs["LSL"], "" ) != "",
		theReport[AxisBox( 2 )] << Add Ref Line( specs["LSL"], "Dashed", black, theYColList[i] || " LSL" )
	);
	If( Try( specs["Target"], "" ) != "",
		theReport[AxisBox( 2 )] << Add Ref Line( specs["Target"], "Dashed", black, theYColList[i] || " Target" )
	);
);
Jim
txnelson
Super User

Re: how to combine 2 graphs i mean like overlaying one on the other

Is the graph that I proposed, an acceptable combining of the 2 graphs? If not, and you need to have the different overlays as defined in your 2 scripts, then I am not aware of a way to cut an paste the graphs from 2 different data tables.
Jim
txnelson
Super User

Re: how to combine 2 graphs i mean like overlaying one on the other

Here is an example that somewhat resembles your 2 data table input that needs to be put together into one plot.  You need to study the script, and then take the new information and apply it back onto your scripts.

txnelson_0-1623209902381.png

Here is the script

Names Default To Here( 1 );
dt = Open( "$sample_data/semiconductor capability.jmp" );

// Create 2 Data tables to mimic the Discussion Question situation
dt1 = dt << subset( columns(Wafer, Site, NPN1), selected rows(0));
dt2 = dt << subset( columns(lot_id, Wafer, Site, NPN2), selected rows(0));

// Select rows wanted from table dt1
dt1 << select where( :wafer <= 10 );
// Create new subset of selected rows
dt1Final = dt1 << subset( selected rows( 1 ), selected columns( 0 ) );

// Select rows wanted from table dt2
dt2 << select where( contains( {"lot01", "lot02"}, :lot_id  ));
// Create new subset of selected rows
dt2Final = dt2 << subset( selected rows( 1 ), selected columns( 0 ) );

// put the data together
dtTogether = dt1Final << concatenate( dt2Final );

gb = Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :wafer ), Y( :NPN1 ), Y( :NPN2, Position( 1 ) ) ),
	Elements( Points( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
theReport = report(gb);

// Create the reference lines
theYColList = { "NPN1", "NPN2" };
For( i = 1, i <= N Items( theYColList ),i++,
	specs = Column( theYColList[i] ) << get property( "spec limits" );
	If( Try( specs["USL"], "" ) != "",
		theReport[AxisBox( 2 )] << Add Ref Line( specs["USL"], "Dashed", black, theYColList[i] || " USL" )
	);
	If( Try( specs["LSL"], "" ) != "",
		theReport[AxisBox( 2 )] << Add Ref Line( specs["LSL"], "Dashed", black, theYColList[i] || " LSL" )
	);
	If( Try( specs["Target"], "" ) != "",
		theReport[AxisBox( 2 )] << Add Ref Line( specs["Target"], "Dashed", black, theYColList[i] || " Target" )
	);
);

 

 

Jim