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
Françoise
Level IV

graph with color

Hi,

 

I want to have a different color for the low part of the graph like this:

fond de carte 1.jpg

 

 


But when I add a variable at the top of the graph, the low part(party) is not quite colored:

 

 

fond de carte 2.jpg

I tried to modify the script: unsuccessfully.How to write the script to have all the low part of the graph with the yellow color?

 

thanks for your help

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
cwillden
Super User

Re: graph with color

Just to be clear, you manually color the bottom partitions, save the script, and then when you run the script it only colors the first bottom partition?

If that’s the case, you’ve discovered a bug. I would suggest calling tech support and they may be able to help you with a workaround as well.
-- Cameron Willden

View solution in original post

5 REPLIES 5
Highlighted
cwillden
Super User

Re: graph with color

All you have to do is right-click in those other graph partitions in the bottom and color the background the same color.  Then save and check the script if want to know how that is scripted.

-- Cameron Willden
Highlighted
Françoise
Level IV

Re: graph with color

I've already done it;

same pb

Highlighted
cwillden
Super User

Re: graph with color

Just to be clear, you manually color the bottom partitions, save the script, and then when you run the script it only colors the first bottom partition?

If that’s the case, you’ve discovered a bug. I would suggest calling tech support and they may be able to help you with a workaround as well.
-- Cameron Willden

View solution in original post

Highlighted
gzmorgan0
Super User

Re: graph with color

Manual worked for me, just a number of Dispatch statements one for each frame box, and they were all even numbered.

It is worth understanding the structure of GraphBuilder as a matrix of output, they are sequentially ordered as 1, top left and ordered by column:  left most column , 1 top, 2 bottom., next column top 3, bottom 4, etc.

 

Here is an example script to do this via jsl.  Since elements have a position, there should be a method to reference the frameboxes by position.

Names Default to Here(1);

dt =open("$Sample_data/Big Class.jmp");
 
gb = dt <<  Graph Builder(
	Size( 570, 490 ),
	Show Control Panel( 0 ),
	Variables(
		X( :height ),
		Y( :weight ),
		Group X( :age ),
		Group Y( :sex ),
		Color( :sex )
	),
	Elements( Points( X, Y, Legend( 5 ) ) ),
);

summarize(lgen=By(:sex));
summarize(lage=By(:age));


fbs = gb << Xpath("//FrameBox");
show(nitems(fbs), nitems(fbs)==nitems(lage)*nitems(lgen) ); // should be 12 = 2 (sex) * 6(age);

for(i=1, i <= nitems(lage), i++,
	fbs[2*i] << Background Color(44);
);
wait(3);
fbs[2*(1::nitems(lage))] << Background Color(77);

image.png

Highlighted
Françoise
Level IV

Re: graph with color

hi,

 

Remove  age and put back  age, it does not work any more.

fond de carte 3.jpg

 

a new bug from SAS?

 

best regards

Article Labels

    There are no labels assigned to this post.