Subscribe Bookmark RSS Feed

Setting Row Color and Markers to column

Ksrzg01

Occasional Contributor

Joined:

May 26, 2017

Hi all,

 

I am running a report which uses a graph from graph builder and below it is a bivariate graph(use script below). When I run the script, the colors do not match up accross the age, how can I force it to where the colors are the same accross both graphs?

 

dt = Open("$SAMPLE_DATA\Big Class.jmp");

GB = H List Box(
	dt << Graph Builder(
	Size( 528, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ), Color( :age ) ),
	Elements( Points( X, Y, Legend( 18 ) ), Smoother( X, Y, Legend( 19 ) ) )
));

Biv = H List Box(
	dt << Bivariate(
	Y( :height ),
	X( :weight ),
	Automatic Recalc( 1 ),
	SendToReport(
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{Row Legend(
				sex,
				Color( 0 ),
				Color Theme( "" ),
				Marker( 1 ),
				Marker Theme( "Standard" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		)
	)
));



DTFilter = H List Box(
	dt << Data Filter(
	Location( {1978, 58} ),
	Conditional,
	Mode( Include( 1 ) ),
	Add Filter(
		columns(  :sex, :name ),
		Display( :name, Size( 160, 225 ), List Display )
	)
));

dt << Color by Column( :age );
dt<< Marker by Column( :sex );

output = New Window( "Trend Analysis", Hlistbox(DTFilter, Vlistbox(GB, Biv)));

Thanks!

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Set the Value Colors, Column Property for the column :Age to the colors you want, and the platforms will default to the colors you have set
Jim
Ksrzg01

Occasional Contributor

Joined:

May 26, 2017

Thanks for the reply, is there a way to script this?

txnelson

Super User

Joined:

Jun 22, 2012

Of course there is :-)

What I suggest you do, is to interactively generate the Value Colors for a given column, and then "Get" the property in a script, and you will see the format of the msg you need to use to "Set" the column property

     Help==>Scripting Index==>Data Table==>Column Scripting==>Get Property

 

Example:

     ColorList = :MyColumn << Get Property( "Value Colors" );

Jim