cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Setting Row Color and Markers to column

Ksrzg01
Level I

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!

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User


Re: Setting Row Color and Markers to column

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

View solution in original post

txnelson
Super User


Re: Setting Row Color and Markers to column

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

View solution in original post

3 REPLIES 3
txnelson
Super User


Re: Setting Row Color and Markers to column

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
Level I


Re: Setting Row Color and Markers to column

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

txnelson
Super User


Re: Setting Row Color and Markers to column

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