cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
UserID16644
Level V

Name Unresolved: Framebox and other properties

Hi all,

I tried creating a function but it keeps getting an error with the framebox, axisbox and outline box. I don't understand the well what is wrong with the function. Please help and explain

 

Name Unresolved: Framebox in access or evaluation of 'Framebox' , Framebox( 1 ) /*###*/

bivplot = Function( {x_param, y_param, int1, int2 },
	biv = Bivariate( X( Column( x_param ) ), Y( Column( y_param ) ), 
	Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
	Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
	Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} ));
	rbiv = biv << Report;
	rbiv[Framebox( 1 )] << {Marker Size( 3 )};
	rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[Framebox( 1 )] << Row Legend( Column( "Sex" ), Color( 1 ), Marker( 0 ), Color Theme( "JMP Default" ), Continuous Scale( 0 ) );
	rbiv[Outline Box( 3 )] << Close All Below;
);

colnamex = {"name1", "age1"};
colname = {"name2", "age2"};
int1 = {1.5, 2};
int2 ={-1.5, -2};

lapbiv = Fit Group (
			For( i = 1, i <= N Items( colname ), i++,
				bivplot( colname[i], colnamex[i], int1[i], int2[i] )
			); 
			<<{Arrange in Rows( 4 )}
			SendToReport(Dispatch({},"Fit Group", OutlineBox,{Set Title( "Correlation Plot (All)")}))	
);
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Name Unresolved: Framebox and other properties

Below is a working version of your script

bivplot = Function( {x_param, y_param, int1, int2},
	biv = Bivariate(
		X( Column( x_param ) ),
		Y( Column( y_param ) ),
		Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
		Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
		Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} )
	);
	rbiv = biv << Report;
	rbiv[Framebox( 1 )] << {Marker Size( 3 )};
	rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
	Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
	Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[Framebox( 1 )] << Row Legend(
		Column( "Sex" ),
		Color( 1 ),
		Marker( 0 ),
		Color Theme( "JMP Default" ),
		Continuous Scale( 0 )
	);
	rbiv[Outline Box( 3 )] << Close All Below;
);

colnamex = {"height", "weight"};
colname = {"weight", "height"};
int1 = {1.5, 2};
int2 = {-1.5, -2};

lapbiv = Fit Group(
	For( i = 1, i <= N Items( colname ), i++,
		bivplot( colname[i], colnamex[i], int1[i], int2[i] )
	)
);
lapbiv << Arrange in Rows( 4 );
Report( lapbiv )[Outline Box( 1 )] << Set Title( "Correlation Plot (All)" );
Jim

View solution in original post

6 REPLIES 6
txnelson
Super User

Re: Name Unresolved: Framebox and other properties

There are a couple of issues.  

  1. The Bivariate platform requires 2 numeric columns.  You are specifying a Name column which I assume is a character column.
  2. The <<[Arrange in rows(4)} and SendToReport are not syntactically correct to be passed to the Display after the platform is completed.

The following code works with the Big Class data table

bivplot = Function( {x_param, y_param, int1, int2 },
	biv = Bivariate( X( Column( x_param ) ), Y( Column( y_param ) ), 
	Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
	Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
	Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} ));
	rbiv = biv << Report;
	rbiv[Framebox( 1 )] << {Marker Size( 3 )};
	rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[Framebox( 1 )] << Row Legend( Column( "Sex" ), Color( 1 ), Marker( 0 ), Color Theme( "JMP Default" ), Continuous Scale( 0 ) );
	rbiv[Outline Box( 3 )] << Close All Below;
);

colnamex = {"height", "weight"};
colname = {"weight", "height"};
int1 = {1.5, 2};
int2 ={-1.5, -2};

lapbiv = Fit Group (
			For( i = 1, i <= N Items( colname ), i++,
				bivplot( colname[i], colnamex[i], int1[i], int2[i] )
			); 
			//<<{Arrange in Rows( 4 )}
			//SendToReport(Dispatch({},"Fit Group", OutlineBox,{Set Title( "Correlation Plot (All)")}))	
);
Jim
UserID16644
Level V

Re: Name Unresolved: Framebox and other properties

Hi txnelson, thank you. May I know how can I arrange the plots into 4 rows if <<[Arrange in rows(4)} and SendToReport are not syntactically correct?

txnelson
Super User

Re: Name Unresolved: Framebox and other properties

Below is a working version of your script

bivplot = Function( {x_param, y_param, int1, int2},
	biv = Bivariate(
		X( Column( x_param ) ),
		Y( Column( y_param ) ),
		Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
		Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
		Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} )
	);
	rbiv = biv << Report;
	rbiv[Framebox( 1 )] << {Marker Size( 3 )};
	rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
	Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
	Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[Framebox( 1 )] << Row Legend(
		Column( "Sex" ),
		Color( 1 ),
		Marker( 0 ),
		Color Theme( "JMP Default" ),
		Continuous Scale( 0 )
	);
	rbiv[Outline Box( 3 )] << Close All Below;
);

colnamex = {"height", "weight"};
colname = {"weight", "height"};
int1 = {1.5, 2};
int2 = {-1.5, -2};

lapbiv = Fit Group(
	For( i = 1, i <= N Items( colname ), i++,
		bivplot( colname[i], colnamex[i], int1[i], int2[i] )
	)
);
lapbiv << Arrange in Rows( 4 );
Report( lapbiv )[Outline Box( 1 )] << Set Title( "Correlation Plot (All)" );
Jim
UserID16644
Level V

Re: Name Unresolved: Framebox and other properties

It now works well, thank you.

But I have an additional question, why is it that when I try to add Group By (:Sex), it is prompting an error
Name Unresolved: Framebox in access or evaluation of 'Framebox' , Framebox( 1 ) /*###*/Exception in platform launch in access or evaluation of 'Fit Group'

 

bivplot = Function( {x_param, y_param, int1, int2},
	biv = Bivariate(
		X( Column( x_param ) ),
		Y( Column( y_param ) ),
        Group By (:Sex),
		Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
		Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
		Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} )
	);
	rbiv = biv << Report;
	rbiv[Framebox( 1 )] << {Marker Size( 3 )};
	rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
	Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
	Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
	rbiv[Framebox( 1 )] << Row Legend(
		Column( "Sex" ),
		Color( 1 ),
		Marker( 0 ),
		Color Theme( "JMP Default" ),
		Continuous Scale( 0 )
	);
	rbiv[Outline Box( 3 )] << Close All Below;
);

  

txnelson
Super User

Re: Name Unresolved: Framebox and other properties

When you have a By() element in Bivariate, a separate Display Tree is created for each By variable level.  The referencing of an object below a specific level in the By variable(s), needs to be specified.

rbiv = report( biv[2] );

Below is a simple example, deleting the whole report for the second level of the By variable Sex

Names Default To Here( 1 );
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "/C:/Program Files/SAS/JMPPRO/15/Samples/Data/Big Class.jmp" );

biv = bivariate( x( :height ), y( :weight ), by( :sex ) );
Show( biv );
Report( biv[2] )[Outline Box( 1 )] << delete;

 

Jim
UserID16644
Level V

Re: Name Unresolved: Framebox and other properties

I see. Thank you for the clear explanation

Recommended Articles