BookmarkSubscribe
Choose Language Hide Translation Bar
Ksrzg01
Community Trekker

Auto-Update Bivariate

Hi all,

 

I'm trying to do a few different things on a bivariate graph and need a bit of assistance. First off, I have a data table which contains the values along with the control limits and I want to create a bivariate plot which, depending what I select on the local data filter, will update the graph with the corresponding UCL/LCL limits as a reference line. Second, I also would like to know how to get the legend to auto update based on my selection instead of having every parameter. Third, is there  a way to get the Y axis to auto-scale based on my selection? The values for my application range quite a bit so I would like the y-axis to auto scale. Thanks in advance for your help. Below is a sample of what I have so far:

 

Bivariate(
	Y( :Value ),
	X( :Date ),
	Automatic Recalc( 1 ),
	Fit Line( {Line Color( {213, 72, 87} )} ),
	Local Data Filter( Conditional, Add Filter( columns( :Parameter ), Where( :Parameter == "Length" ) ) ),
	SendToReport(
		Dispatch(
			{},
			"2",
			ScaleBox,
			{Add Ref Line( 28.333333, "Solid", "Black", "LCL", 1 ), Add Ref Line(
				Column( "UCL" )[1],
				Dotted,
				{0, 255, 0},
				"ENG UCL (" || Char( Column( "UCL" )[1] ) || ")"
			), Add Ref Line( Column( "LCL" )[1], Dotted, {0, 255, 0}, "ENG LCL (" || Char( Column( "LCL" )[1] ) || ")" ),
			Add Ref Line( Column( "Target" )[1], Dotted, {0, 255, 0}, "ENG TGT (" || Char( Column( "Target" )[1] ) || ")" )}
		),
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{Row Legend(
				Parameter,
				Color( 1 ),
				Color Theme( "JMP Default" ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)
				
			}
		)
	)
)
0 Kudos
4 REPLIES 4

Re: Auto-Update Bivariate

 
Learn it once, use it forever!
0 Kudos
Ksrzg01
Community Trekker

Re: Auto-Update Bivariate

Hey Mark, thanks for the quick reply.  When I do add Automatic Recalc(1) to the script, it still doesnt recalculate the y axis nor remove the excess items from the legend. The only thing it does with this attribute is remove the non-selected values from the graph.

0 Kudos

Re: Auto-Update Bivariate

Sorry about that mistake. First of all, you need to enable the Include option in the data filter. This way the regression will refit the trend line for the data filter selection. Second of all, the update does not adjust the scale. I can't remember which platforms have plots, such as Distribution, that respond to Include, and which ones do not. Apparently, Bivariate does not.

I am rather busy at the moment but many scripting experts help out here. You could write your own handler to work with the local data filter to monitor the changes in the platform and then adjust the scale as necessary.

Learn it once, use it forever!
0 Kudos
IanAtJMP
Community Manager Community Manager

Re: Auto-Update Bivariate

FYI -- I removed an extraneous comma at the end of line 18 and reformatted the script so it could be displayed in pretty form.
Community Manager, Senior Digital Designer at JMP
0 Kudos