cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
jk137
Level I

How do I create two independent row legends in the same output tab? JSL JMP12

Hi friends,

 

I am working on a report that has multiple plots in the same output tab. For plot 1 I want the row legend colors to be based on tool 1. For plot 2 I want the row legend colors to be based on tool 2. When I assign tool 2 to the row legend for plot 2 the colors in plot 2 still match the tool 1 colors established in plot 1. I have another column utilizing the alphanumeric row legend so this is not an option. 

 

Is there a way to assign different row states for each plot?

Below is some sample code similar to my script. 

 

Output01_DB = vlistbox(
DT1<<Bivariate (	Y( :y1, ),	X( :time ), 
	Automatic Recalc( 1 ),
	Local Data Filter(
	Location( {2438, 7} ),
	Mode( Select( 0 ), Show( 1 ), Include( 1 ) ),
		Add Filter(0)),
	Where( :z == "1" ),
	SendToReport(
		Dispatch(
			{},
			"2",
			ScaleBox,
			{Min( -4 ), Max( 4 ), Inc( 1 ), Minor Ticks( 1 ),
			Add Ref Line( 0, Dotted, {0, 0, 0}, "middle", 2 ),
			Add Ref Line( 3, Dotted, {255, 0, 0}, "upper", 2 ),
			Add Ref Line( -3, Dotted, {255, 0, 0}, "lower", 2 ),
			Add Ref Line( 2, Dotted, {204, 204, 204}, "", 2 ),
			Add Ref Line( -2, Dotted, {204, 204, 204}, "", 2 ),
			Add Ref Line( 1, Dotted, {204, 204, 204}, "", 2 ),
			Add Ref Line( -1, Dotted, {204, 204, 204}, "", 2 )}
		),
		Dispatch( {}, "Bivar Plot", FrameBox,
			{Frame Size( 920, 490 ), Marker Size( 4 ), Row Legend(
				tool_1,
				Color( 1 ),
				Color Theme( "JMP Dark" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		)
	)
));

Output02_DB = vlistbox(
DT1<<Bivariate (	Y( :y2, ),	X( :time ), 
	Automatic Recalc( 1 ),
	Local Data Filter(
	Location( {2438, 7} ),
	Mode( Select( 0 ), Show( 1 ), Include( 1 ) ),
		Add Filter(0)),
	Where( :z == "1" ),
	SendToReport(
		Dispatch(
			{},
			"2",
			ScaleBox,
			{Min( -4 ), Max( 4 ), Inc( 1 ), Minor Ticks( 1 ),
			Add Ref Line( 0, Dotted, {0, 0, 0}, "middle", 2 ),
			Add Ref Line( 3, Dotted, {255, 0, 0}, "upper", 2 ),
			Add Ref Line( -3, Dotted, {255, 0, 0}, "lower", 2 ),
			Add Ref Line( 2, Dotted, {204, 204, 204}, "", 2 ),
			Add Ref Line( -2, Dotted, {204, 204, 204}, "", 2 ),
			Add Ref Line( 1, Dotted, {204, 204, 204}, "", 2 ),
			Add Ref Line( -1, Dotted, {204, 204, 204}, "", 2 )}
		),
		Dispatch( {}, "Bivar Plot", FrameBox,
			{Frame Size( 920, 490 ), Marker Size( 4 ), Row Legend(
				tool_2,
				Color( 1 ),
				Color Theme( "JMP Dark" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		)
	)
));

indiv_report = vlistbox(Output01_DB, Output02_DB)

Z1 header << append(indiv_report)

#JSL  #JMP12Pro 

1 REPLY 1
ErraticAttack
Level VI

Re: How do I create two independent row legends in the same output tab? JSL JMP12

I'm quite certain that there is no method for doing what you ask -- having multiple independent row-states for any given table.

 

However, you can create what you're wanting by subsetting the columns of interest for each plot and then use each subsetted table for each respective plot.  If you're adamant about having the tables be linked (as in, selections in one table should then select the same rows in all tables) -- this can be done using rowstate handlers, but it is a bit finicky to implement in practice (I've done it, but unless you're quite comfortable with JSL programming and scope resolution you will probably run into issues).

Jordan