cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
peter_t
Level I

Control markers and colors in Graph Builder script

Dear all,

 

I am building a script to make a graph using graph builder. The resulting graph builder figure have to be in black/white/grayscales, and should only contain filled/solid markers. An example of what I would like is shown here

peter_t_0-1619514381740.png

 

I do not know the names or number of overlay-levels (Ages in the Big Class example).

I have attempted using Color Theme and Graph Marker Theme within Legend Model Properties to control the color and markers. However, this does not change the color or markers.

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb=dt << Graph Builder(
	Variables( X( :height ), Y( :weight ), Overlay( :age ) , Color( :age )),
	Elements( Points( X, Y, Legend( 15 ) ), Smoother( X, Y, Legend( 16 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				15,
				Properties({Color Theme( "White to Black" ), Graph Marker Theme( "Solid" )})),
			Legend Model(
				16,
				Properties({Color Theme( "White to Black" ), Graph Marker Theme( "Solid" )}))
			}	
	)
));

Anybody has a suggestion on how to control the colors to black/white/gray and the markers to solid/filled?

 

Thanks,

Peter

2 REPLIES 2
mlo1
Level IV

Re: Control markers and colors in Graph Builder script

Hi Peter

is it possible that setting the column properties  first (value colors) solves the issue you have?

 

mlo1_0-1619516116806.png

// Change column property: age
Data Table( "Big Class" ):age << Set Property(
"Value Colors",
{12 = -14013909, 13 = -11184810, 14 = -8421504, 15 = -5592405, 16 = -2763306, 17
= 0}
);

peter_t
Level I

Re: Control markers and colors in Graph Builder script

I can see that this will work in the example given where the values of the grouping column (Ages) are known. However, in my application the values of the grouping column will be new every time. 

And also I was hoping to find a solution that did not involve changing the column properties since other graphs using the same data table should have normal colors and markers.