BookmarkSubscribeRSS Feed

How to overlay two contour plots?

marcokunzelmann

Community Trekker

Joined:

Jun 9, 2015

Hello community,

short and hopefully an easy question. I want to overlay 2 contour plots, how can I do that in an simple way?

Please give me a detailed description, I'm totally new to jmp

Greetings!

1 ACCEPTED SOLUTION

Accepted Solutions
bill_worley

Staff

Joined:

Jul 2, 2014

Solution

Hi,

Make your contour plots and then right click in one of them.  Go to Edit > Copy Frame Contents.  Go to the other plot right click and go to Edit.  Select Paste Frame Contents.

Best,

Bill

9 REPLIES
bill_worley

Staff

Joined:

Jul 2, 2014

Solution

Hi,

Make your contour plots and then right click in one of them.  Go to Edit > Copy Frame Contents.  Go to the other plot right click and go to Edit.  Select Paste Frame Contents.

Best,

Bill

bwilliamson

Community Trekker

Joined:

Jul 27, 2015

I don't have the "Copy" or "Paste Frame Contents" as an option under the Edit heading on the graph (JMP 12.0.1)... =(

 

Does the contour plot have to be based on a model? I'm using a plethora of data points to make the contour plots.

 

Thanks

David_Burnham

Super User

Joined:

Jul 13, 2011

Where are you looking? This is a feature associated with all graphs and has been around as long as I can remember so you will have it in version 12.  Right mouse click in the graphical area.  This is where you will typically have options to change line widths, marker size etc.  The last option is Edit.  This is a menu of options including the ability to copy and paste frame contents.

-Dave
bwilliamson

Community Trekker

Joined:

Jul 27, 2015

X_x
I was looking under the "Edit" menu in the toolbar, not the popup menu on the plot area.
Thanks for your help!
KyleJK

New Contributor

Joined:

Sep 8, 2017

This works fine in a manual sense, but how do you generalize/automate this?  I created two contour plots like this and copied one over to the other.  Then I tried saving that script, but the copied contours were not saved in the script.  This means I would have to run both scripts and copy every time I wanted to see the chart.

 

Basically, I am trying to add a contour for a second variable that I am using as a constraint for the design space.  I know you can use the Contour Profiler to easily add multiple contours and create upper and/or lower limits, but the Contour Profiler forces you to fit models to the data first.  My data can not be fit well in this case, so I would like to display limit contours of seveal variables using the Contour Plot platform (or the Contour Functionality within the Graph Builder, either way). 

 

If I could generate one script that would plot the contours for all of my limiting variables separately and then superimpose the limiting variables on top of my main variable of interest, that would be great.

 

Any ideas?

markbailey

Staff

Joined:

Jun 23, 2011

You could stack the table so that all of the responses appear in one column and JMP will create the indicator column. Use the indicator column in the overlay drop zone.

Learn it once, use it forever!
markbailey

Staff

Joined:

Jun 23, 2011

Here is a simple example. I want to separately plot contours for three pulse values versus Oxy. I stack the three columns and call it Pulse. The source column names are saved in a new indicator column that is used in the Overlay role.

dt1 = Open( "$SAMPLE_DATA/Fitness.jmp" );

dt2 = dt1 << Stack(
	Columns( :RunPulse, :RstPulse, :MaxPulse ),
	Source Label Column( "Source" ),
	Stacked Data Column( "Pulse" )
);

Close( dt1 );

dt2 << Graph Builder(
	Size( 530, 452 ),
	Show Control Panel( 0 ),
	Variables( X( :Oxy ), Y( :Pulse ), Overlay( :Source ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);
Learn it once, use it forever!
KyleJK

New Contributor

Joined:

Sep 8, 2017

This is sort of in the right direction, but not quite.  I like that it shows all three contours, but I need each group to have numerical contours, not just density.  Something similar to if you ran your script and then in the graph builder you dropped the "Runtime" column into the "Color" role.  This shows three separate sets of contours, which is what I want, but each one needs its own scale, and I need just the lines instead of being filled in so that they don't cover each other up.  Even if I can't have separate scales, then labeling each contour would suffice (just like how the Contour Profiler does it).

markbailey

Staff

Joined:

Jun 23, 2011

Is this example what you want to do?

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Graph Builder(
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Contour( X, Y, Legend( 5 ) ) )
);
Learn it once, use it forever!