cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Due to inclement weather, JMP support response times may be slower than usual during the week of January 26.
    To submit a request for support, please send email to support@jmp.com.
    We appreciate your patience at this time.
  • Register to see how to import and prepare Excel data on Jan. 30 from 2 to 3 p.m. ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
ravij
Level III

Value Order

ravij_0-1768997502956.png

 

I wanted to change the order of the X Groupings, I could do it using GUI with Value order, but I am not able to do it using jsl, what is right way of accessing all X Group parameters and how to manipulate their order in jsl

What are the different boxes mean? Ex: axis_boxes, scale_boxes, Frame_boxes etc?

9 REPLIES 9
ravij
Level III

Re: Value Order

I tried below code, which didn't work

 

Try(
axis_box = gb_report[AxisBox(1)];
axis_box << Set Property("Value Order", {"Continuity_VDD", "Continuity_GND"});
,
// If that doesn't work, use XPath
axis_boxes = gb_report << XPath("//AxisBox");
If(N Items(axis_boxes) > 0,
axis_boxes[1] << Set Property("Value Order", {"Continuity_VDD", "Continuity_GND"});
);
);
mmarchandFSLR
Level VI

Re: Value Order

Value Order is a column property, so send that message to the column, not the axis.

ravij
Level III

Re: Value Order

I Tried that aswell, but didn't see any change in my graph

Column(dt,"TestNameReference")<< Set Property("Value Order", {"Continuity_VDD", "Continuity_GND"});	
dt<<Save();
mmarchandFSLR
Level VI

Re: Value Order

Perform the action manually and copy the generated code from the log.  Edit as needed.

 

dt:TestNameReference << Set Property(
	"Value Order",
	{Custom Order( {"Continuity_VDD", "Continuity_GND"} )}
);
ravij
Level III

Re: Value Order

I noticed that even if I change value order in data table manually and then if I plot graph with my jsl script, the value order is not applied to the plot

When could only modify value order after the plot is generated, directly on Graph builder GUI

mmarchandFSLR
Level VI

Re: Value Order

I'm unable to recreate your issue.  I have the value order set for :TestNameReference, and it is automatically ordered correctly when I create the graph.  Can you share the script you're using for the graph?  What JMP version are you on?

 

mmarchandFSLR_0-1769004540190.png

 

txnelson
Super User

Re: Value Order

Here is a working example that sets the value order after the graph is drawn.

txnelson_0-1769009233306.png

names default to here(1);
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );



Graph Builder(
	Variables( X( :age ), Y( :height ), Group X( :sex ), Color( :age ) ),
	Elements( Box Plot( X, Y, Legend( 5 ) ) )
);

dt:sex << set property("value order", {Custom Order( {"M", "F"} )});
Jim
ravij
Level III

Re: Value Order

I Tried the exact command but with no change to the final plot, here is my code 

Simple_Plot = Function({dt, file_name},
	plot_filename = Munger(file_name, Length(file_name) - 3,4, "_plot.png") ;
	plot_path = ::plots_output_path || plot_filename;
	plot_title = Munger(file_name, Length(file_name)-3,4,"");
	gb_obj = dt << Graph Builder(
				Title(plot_title),
				Show Window(1),
				Size(::SizeX, ::SizeY),
				Show Control Panel(0),
				Variables( 
								Y( :Data ), 
								Group X( :TestNameReference ),
								Group X( :TestTemperature ),
								Overlay(:WaferNumber)
							),
				Elements( 
								Box Plot( Y, Legend( 1 ) ), // Legend is optional but helpful
								Caption Box(Y, Legend( 2 ), Summary Statistic( "Mean" ), Location( "Top" ) ),
								Caption Box(Y, Legend( 3 ), Summary Statistic( "Std Dev" ), Location( "Bottom" ) )					
							)
			);
	gb_report = gb_obj << Report;
	gb_report << Prepend(Outline Box(plot_title), Spacer Box(Size(::TitleSize1, ::TitleSize2)));
	
	gb_obj << Bring Window To Front;	
	dt << Select All Rows;
	//Throw();
	gb_obj << Save Picture( plot_path, "png" );
	Print("  Plot saved: " || plot_filename);
	
	Close(gb_obj, no save);
);




If (Contains (file_name, "Continuity_Test" ),
		Print("Generating plot for: " || file_name);
		//Column(dt,"TestNameReference") << Set Property("Value Ordering", "Custom");
		Column(dt,"TestNameReference")<< Set Property("Value Order", {Custome Order({"Continuity_VDD", "Continuity_GND"})});	
		dt<<Save();
		Simple_Plot(dt,file_name);
	);
mmarchandFSLR
Level VI

Re: Value Order

Could it be as simple as this typo?  {Custome Order(.... should be {Custom Order(....

If (Contains (file_name, "Continuity_Test" ),
		Print("Generating plot for: " || file_name);
		//Column(dt,"TestNameReference") << Set Property("Value Ordering", "Custom");
		Column(dt,"TestNameReference")<< Set Property("Value Order", {Custome Order({"Continuity_VDD", "Continuity_GND"})});	
		dt<<Save();
		Simple_Plot(dt,file_name);
	);

Recommended Articles