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

Surface Plot: Automating the Display Editing

Hi,

I have a large set of data that has 231 unique samples (labeled as RunID) that has a set of X,Y,Z values for each of the unique samples. Using the graph "Surface Plot" tool I then create a 3D plot for each of these 231 runs which brings up 231 graphs in a new window. I want to modify the display of this so that the style is a surface and then modify the surface to display continuous gradients. However, I don't want to do this manually for all 231 plots, but I can't seem to figure out how set the script so that it goes through all 231 unique RunIDs. Looking at the script window output it shows that I need to put something in the "where" function that says to do this for all of the unique RunIDs, not just the one that is listed for the first plot. 

 

This seems like something easy, but I can't find anything in the JMP discussion. 

Surface Plot(
	Columns( :X, :Y, :Z ),
	Datapoints Choice( "Surface" ),
	Surface Color Theme( "Green to Black to Red" ),
	Surface Color Theme2( "Green to White to Red" ),
	Surface Color Theme3( "White to Black" ),
	Surface Color Theme4( "Blue to Gray to Red" ),
	Response Column Fill( "Continuous Gradients" ),
	Response Column Color Theme( "Blue to Green to Red" ),
	Response Column Color Theme2( "Blue to Gray to Orange" ),
	Response Column Color Theme3( "Spectral" ),
	Response Column Color Theme4( "Jet" ),
	Response( :Z ),
	Surface Color Method( "Solid", "Solid", "Solid", "Solid" ),
	SetVariableAxis( :X, Axis Data( {} ) ),
	SetVariableAxis( :Y, Axis Data( {} ) ),
	SetZAxis( :Z, Current Value( -170000 ), Axis Data( {} ) ),
	SetXVariable( :X ),
	SetYVariable( :Y ),
	Frame3D( Set Rotation( -54, 0, 38 ) ),
	Where( :RunID == "0a6609" )
);
3 REPLIES 3
txnelson
Super User

Re: Surface Plot: Automating the Display Editing

Try changing 

Where( :RunID == "0a6609" )

to

By( :RunID)

I should replicate all of the gradients, etc

Jim
rlangsner
Level II

Re: Surface Plot: Automating the Display Editing

This worked! 

Thank you!

Craige_Hales
Super User

Re: Surface Plot: Automating the Display Editing

change the where(...) to by(:RunID)

 

If you use the red triangle save script, one of the choices will be for the by variable.

 

Option to create the script with by group.Option to create the script with by group.

Craige