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.
Choose Language Hide Translation Bar
DanAlexander
Level III

Hiding graph in Bivariate analysis?

Hello,

 

I have a script which include a Bivariate analysis, however I would like to have just the Linear Fit statistics table show  up, and hide the graph itself. 

 

this_dt << Bivariate(
		Y( Column(this_dt, this_cols[j])),
		X( :"Time (Months)" ),
		By( :"Lot Number" ),
		Fit Line,
		Invisible
)

As you can see I included the Invisible condition in Bivariate( ), but the graph is still showing up in my JRN file, and I am not sure how to get rid of it.

 

1 ACCEPTED SOLUTION

Accepted Solutions
DanAlexander
Level III

Re: Hiding graph in Bivariate analysis?

Thank you for your suggestion. 

 

I also found an alternative solution which I can write within Bivariate().

 

SendToReport( Dispatch( {}, "", ListBox, {Visibility( "Collapse" )} ) )

The above line hides the box containing the Bivariate plot.

View solution in original post

4 REPLIES 4

Re: Hiding graph in Bivariate analysis?

biv = this_dt << Bivariate(
		Y( Column(this_dt, this_cols[j])),
		X( :"Time (Months)" ),
		By( :"Lot Number" ),
		Fit Line,
		Invisible
);

biv rep = biv << Report;

// one way
biv rep[PictureBox(1)] << Delete;

// other way
biv rep[PictureBox(1)] << Visibility( "Collapse" );
DanAlexander
Level III

Re: Hiding graph in Bivariate analysis?

Thank you for your suggestion. 

 

I also found an alternative solution which I can write within Bivariate().

 

SendToReport( Dispatch( {}, "", ListBox, {Visibility( "Collapse" )} ) )

The above line hides the box containing the Bivariate plot.

KarenC
Super User (Alumni)

Re: Hiding graph in Bivariate analysis?

I see you have ways to hide it but I would ask why? The plot is my favorite part of bivariate (unless you have multitudes of them in which case I would use response screening). Happy World Stats Day!
DanAlexander
Level III

Re: Hiding graph in Bivariate analysis?

Hello,

I am using the Bivariate function just to generate Linear fit statistics for my main graph. I am using V List box and H List box to generate a plot using graph builder, and then Bivariate to generate the linear fit statistics for each lot number in an H List box beside the plot. Each graph builder plot may have up to 20-30 Bivariates associated with it.

 

If you can suggest a better alternative, I would love to hear it! Below is an example of my script, sorry if it is confusing, I had to hide specific file paths and columns names.

		// Generating Graphs
setup = Function({dt}, {Default Local},
	
	dt = Open ( "file.JMP" );
	dt << Select Where(:"column example" == "string example" );
	cfg1 = EvalList({dt << Data View, { "col1", "col2", "col3", "coln"}});
	EvalList({cfg1});
	
);

build_graphs = Function({cfgs}, {Default Local},
	win = New Window( "window", vlb = V List Box() );

	ncfg = NItems(cfgs);	
	
	for(i = 1, i <= ncfg, i++,
		{this_dt, this_cols} = cfgs[i];
		ncols = NItems(this_cols);
		for(j = 1, j <= ncols, j++,
			vlb << Append(H List Box (
					this_dt << Graph Builder(
						Show Control Panel( 0 ),
						Size( 600, 400),
						Variables(
							X( :"X axis" ), 
							Y( Column(this_dt, this_cols[j]) ), 
							Overlay( :"overlay" ) 		
						),
						Elements( 
							Points( X, Y, Legend(12) )
						),
						SendToReport(
							Dispatch(
								{},
								"",
								ScaleBox,
								{Format( "Fixed Dec", 10, 0 ), Min(0), Max(50), Inc(6),
								Minor Ticks(0)}
								)	
							)
						),
						this_dt << Bivariate(
							Y( Column(this_dt, this_cols[j])),
							X( :"X axis" ),
							By( :"overlay" ),
							Fit Line,
							SendToReport( Dispatch( {}, "", ListBox, {Visibility( "Collapse" )} ) )
							)
						));			
			)
		);
		win		
	);
	

dt = Open ( "file.JMP" );
cfgs = setup(dt);
Show(cfgs);
win = build_graphs(cfgs);
Show(win);
win << Save Journal("file.jrn", embed data(1));