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
Lucas_UDE
Level I

Adjusting the Output Size of Surface Plot without JSL Script

Hello,

I am generating a number of surface plots for a publication and since I am a beginner I am not using the JSL Script. Also, I want to be able to spin the plots in the surface plot tool, label the axes and so on. Everything works fine and I really like it, but what is driving me mad is the export of graphics. I found a way to remove the title ("surface plot") but I cannot keep the size consistent:

I want to have square diagrams of a decent size, and without the margin/box in black around them. I managed to drag the size of the box  in the graph builder and this for sure has an influence on the export, but that´s not really an option for me since I have several surface plots and they must all be of the same size e.g. 800 x 8000 (otherwise it looks nasty in my paper). So I am looking for a way to adjust this in the "properties" function, but without success. I even tried to use AI-generated JSL Code for that, but I think I failed in refering the code to the respective surface plot.

I hope that somebody can help me ...

Thanks alot!

Lucas

Problem_Surfaceplot.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Adjusting the Output Size of Surface Plot without JSL Script

Try if setting Height and Width of the SceneBox works for you

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Tiretread.jmp");
obj = dt << Surface Plot(
	Columns(
		:Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG,
		:Pred Formula HARDNESS
	)
);
wait(1); // demo purposes
Report(obj)[SceneBox(1)] << Height(800);
Report(obj)[SceneBox(1)] << Width(800);

jthi_0-1730200550659.png

 

-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Adjusting the Output Size of Surface Plot without JSL Script

Try if setting Height and Width of the SceneBox works for you

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Tiretread.jmp");
obj = dt << Surface Plot(
	Columns(
		:Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG,
		:Pred Formula HARDNESS
	)
);
wait(1); // demo purposes
Report(obj)[SceneBox(1)] << Height(800);
Report(obj)[SceneBox(1)] << Width(800);

jthi_0-1730200550659.png

 

-Jarmo
Lucas_UDE
Level I

Re: Adjusting the Output Size of Surface Plot without JSL Script

Hi,

and thanks a lot, although this was not exactly the way I was looking for since it involves a script in JSL. It seems it is inevitable to learn JSL if you want to use the entire potential of JMP. Now I invested quite some time (and help from Perplexity) to find a script that can do the entire job for me and ended up with this:

Names Default To Here(1);
dt = Current Data Table();
obj = dt << Surface Plot(
    Columns(
        :Caffeine Removal RSM Model, :Heating Rate, :Heating Ramp Duration
    )
);

// Ensure the plot is created before attempting to modify it
Wait(1);

// Access the report and modify dimensions
objReport = obj << Report;
// Setzen der Breite und Höhe des SceneBox (3D-Plot)
objReport[SceneBox(1)] << Set Width(800);
objReport[SceneBox(1)] << Set Height(800);
objReport[OutlineBox(1)] << Set Title("");
objReport[SceneBox(1)] << Background Color("White");

This works, so far. My problem is now that I would really like it to directly change the color type of my 3D plot to "discrete gradients". I tried:

objReport[SceneBox(1)] << Set Property("Fill Type", "Discrete Gradients");
objReport[SceneBox(1)] << Set Property("Number of Levels", 10);

But it seems that it cannot find the right objects to modify. I searched the "Sheet Properties" (see picture) in the Tree Structure of the plot, but couldn´t find it. My two lines of script have no effect.

Problem 2.jpg

jthi
Super User

Re: Adjusting the Output Size of Surface Plot without JSL Script

Usually you start by making the modifications by hand checking out the script for possible messages you can use

jthi_2-1730388203218.png

Surface Plot(
	Columns(:Pred Formula ABRASION),
	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("Discrete Gradients"),
	Response Column Gradients(10),
	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(:Pred Formula ABRASION),
	Equation(., ., ., .),
	Surface Color Method("Solid", "Solid", "Solid", "Solid"),
	SetVariableAxis(:SILICA, Axis Data({})),
	SetVariableAxis(:SILANE, Axis Data({})),
	SetZAxis(:Pred Formula ABRASION, Current Value(146.121949348339)),
	SetXVariable(:SILICA),
	SetYVariable(:SILANE),
	Iso Value(0, 139.119238722661),
	Frame3D(Set Rotation(-54, 0, 38))
);

and then if that isn't enough, take a look at scripting index as it might contain what you need.

jthi_0-1730388018954.png

jthi_1-1730388148912.png

 

This same can also be true for the size. Resize it by hand and check the script JMP creates for you

	Frame3D(Set Graph Size(200, 200), Set Rotation(-54, 0, 38))

jthi_3-1730388394317.png

If this is the size you wish to change, then I went with much more complicated route in my first response (because I didn't bother checking for special messages that Surface Plot might use).

-Jarmo