cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMPĀ® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
abmayfield
Level VI

overlaying data from multiple parameters (each with a unique scale) onto a map

Hello, 

   I have routinely used JMP to overlay data on maps, a feature that I love. Normally, I standardize my data to where they are all on the same scale, stack the columns I want to plot, and overlay the stacked data in Graph Builder (as contour plots; see attached image for an example). However, I now want to overlay data from multiple parameters WITHOUT first standardizing them (so that they maintain their original scales). I realize I could make individual plots, copy them, and paste them into Adobe Illustrator, but I would prefer to use Graph Builder and wrap by parameter name ("label") if at all possible. Is there a way I can stack columns that are NOT on the same scale and then build a map-based graph in which they feature different y axes? I have posted a datasheet in which I would like to plot temperature, salinity, and ALCC onto a map. Thanks!

Screen Shot 2018-07-26 at 16.23.03.png

Anderson B. Mayfield
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: overlaying data from multiple parameters (each with a unique scale) onto a map

Is this the kind of thing you are looking for?

fourups.PNG

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

gb1 = Graph Builder(
	invisible,
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :PNP1 ), Y( :NPN1 ), Color( :NPN2 ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);
gb2 = Graph Builder(
	invisible,
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :NPN2 ), Y( :PNP3 ), Color( :PNP4 ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);
gb3 = Graph Builder(
	invisible,
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :PNP4 ), Y( :NPN4 ), Color( :INM2 ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);
gb4 = Graph Builder(
	invisible,
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :PBA1 ), Y( :WPR1 ), Color( :PLY10 ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);

nw = New Window( "xxx", V List Box( hlb1 = H List Box(), hlb2 = H List Box() ) );

hlb1 << append( Report( gb1 )[List Box( 2 )] );
hlb1 << append( Report( gb2 )[List Box( 2 )] );
hlb2 << append( Report( gb3 )[List Box( 2 )] );
hlb2 << append( Report( gb4 )[List Box( 2 )] );
Jim

View solution in original post

7 REPLIES 7
txnelson
Super User

Re: overlaying data from multiple parameters (each with a unique scale) onto a map

Is this the kind of thing you are looking for?

fourups.PNG

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

gb1 = Graph Builder(
	invisible,
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :PNP1 ), Y( :NPN1 ), Color( :NPN2 ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);
gb2 = Graph Builder(
	invisible,
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :NPN2 ), Y( :PNP3 ), Color( :PNP4 ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);
gb3 = Graph Builder(
	invisible,
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :PNP4 ), Y( :NPN4 ), Color( :INM2 ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);
gb4 = Graph Builder(
	invisible,
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :PBA1 ), Y( :WPR1 ), Color( :PLY10 ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);

nw = New Window( "xxx", V List Box( hlb1 = H List Box(), hlb2 = H List Box() ) );

hlb1 << append( Report( gb1 )[List Box( 2 )] );
hlb1 << append( Report( gb2 )[List Box( 2 )] );
hlb2 << append( Report( gb3 )[List Box( 2 )] );
hlb2 << append( Report( gb4 )[List Box( 2 )] );
Jim
abmayfield
Level VI

Re: overlaying data from multiple parameters (each with a unique scale) onto a map

Jim, I completely forgot that combining windows was an option and did not realize how easy it is to copy JSL scripts to a common script window, so I think this will work. Basically, I am trying to make publication quality figures without the need to use Illustrator to merge different graphs, plots, etc. I like your script because it just shows the figures, not with all the confusing boxes and containers found in Dashboard! Thanks!

Anderson B. Mayfield
gzmorgan0
Super User (Alumni)

Re: overlaying data from multiple parameters (each with a unique scale) onto a map

This is just a simple add-on/alternative to Jim's detailed script: you might want to try using a LineUpBox.

nw = New Window( "xxx", V List Box(  lub = LineUpBox(ncol(2)) ) );

lub << append( Report( gb1 )[List Box( 2 )] );
lub << append( Report( gb2 )[List Box( 2 )] );
lub << append( Report( gb3 )[List Box( 2 )] );
lub << append( Report( gb4 )[List Box( 2 )] );
_fb = lub << xpath("//FrameBox"); //get all frameboxes
_fb << FrameSize(175,175);         //change the framebox size
lub << Spacing(20,10);             //set horizontal and vertical spacing between 
abmayfield
Level VI

Re: overlaying data from multiple parameters (each with a unique scale) onto a map

Thank you for your response. Is the major difference in your script that the frame size and spacing can be modified? What is a lineupbox?

Anderson B. Mayfield
abmayfield
Level VI

Re: overlaying data from multiple parameters (each with a unique scale) onto a map

BTW (to other interested individuals), it appears that there are even other ways: https://community.jmp.com/t5/Discussions/Graph-Builder-Wrap-With-different-Y-Axis-Scales/td-p/50307

Anderson B. Mayfield
txnelson
Super User

Re: overlaying data from multiple parameters (each with a unique scale) onto a map

Best way to find that out is to look up LineUp Box() in the Scripting Index

     Help==>Scripting Index

Jim
gzmorgan0
Super User (Alumni)

Re: overlaying data from multiple parameters (each with a unique scale) onto a map

Framesize and spacing can be changed with Jim's solution as well.  I like using LineUpBox because after the window is drawn I can send the message to change ncol() or to change the spacing:

lub << ncol( 3 );
lub<< spacing( 20,6);