Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
japierce
Level I

Shifting a the control treatment in graph builder

I tried shifting treatments on the x axis of graph builder. I want the control first on the x axis but when I tried a few options for shifting locations the only ones that put the control where I wanted it moved other treatments which are paired. 

3 REPLIES 3
Highlighted

Re: Shifting a the control treatment in graph builder

If possible, please share an image of your graph.  Also, what version of JMP are you using?  This sounds like something you could fix with value ordering.

Highlighted
japierce
Level I

Re: Shifting a the control treatment in graph builder

JMP14Pro. I tried a graph separately. Thanks!
Highlighted
gzmorgan0
Super User

Re: Shifting a the control treatment in graph builder

As @bill_worley stated, I think you need Value Ordering  try this script

 

Names Default to Here(1);

bc_agegrp = Open("$Sample_data/Big Class.jmp");

//Add a new column Age Group

bc_agegrp  << New Column("Age Group", character);
:Age Group << Set Each Value(If(
	:age < 15, "Younger",
	:age < 16, "Middle",
	"Older"
));

gb1 = Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :Age Group ), Y( :weight ), Color( :Age Group ) ),
	Elements( Box Plot( X, Y, Legend( 6 ) ), Points( X, Y, Legend( 7 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {6, [0, 1, 2, 3, -3], 7, [-1, -1, -1]} ),
			Position( {0, 1, 2, 3, -3, -1, -1, -1} )}
		)
	)
);

report(gb1)[OutlineBox(1)] << set Title("No Value Ordering");

Wait(3);
//-----Value Ordering-------
:Age Group << Set Property("Value Ordering", {"Younger", "Middle", "Older"});

To do this by using the point and click:

  • select the column you want to reorder
  • right click and select, Column Properties, then Value Ordering
  • Move the values up and down to the order you want and press OK

image.png

image.png

Article Labels

    There are no labels assigned to this post.